@workglow/tasks 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1265 -11
- package/dist/browser.js.map +22 -4
- package/dist/bun.d.ts +1 -1
- package/dist/bun.d.ts.map +1 -1
- package/dist/bun.js +1268 -14
- package/dist/bun.js.map +22 -4
- package/dist/common.d.ts +36 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +1268 -14
- package/dist/node.js.map +22 -4
- package/dist/task/image/ImageBlurTask.d.ts +219 -0
- package/dist/task/image/ImageBlurTask.d.ts.map +1 -0
- package/dist/task/image/ImageBorderTask.d.ts +281 -0
- package/dist/task/image/ImageBorderTask.d.ts.map +1 -0
- package/dist/task/image/ImageBrightnessTask.d.ts +219 -0
- package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -0
- package/dist/task/image/ImageContrastTask.d.ts +219 -0
- package/dist/task/image/ImageContrastTask.d.ts.map +1 -0
- package/dist/task/image/ImageCropTask.d.ts +251 -0
- package/dist/task/image/ImageCropTask.d.ts.map +1 -0
- package/dist/task/image/ImageFlipTask.d.ts +215 -0
- package/dist/task/image/ImageFlipTask.d.ts.map +1 -0
- package/dist/task/image/ImageGrayscaleTask.d.ts +203 -0
- package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -0
- package/dist/task/image/ImageInvertTask.d.ts +203 -0
- package/dist/task/image/ImageInvertTask.d.ts.map +1 -0
- package/dist/task/image/ImagePixelateTask.d.ts +217 -0
- package/dist/task/image/ImagePixelateTask.d.ts.map +1 -0
- package/dist/task/image/ImagePosterizeTask.d.ts +219 -0
- package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -0
- package/dist/task/image/ImageResizeTask.d.ts +227 -0
- package/dist/task/image/ImageResizeTask.d.ts.map +1 -0
- package/dist/task/image/ImageRotateTask.d.ts +215 -0
- package/dist/task/image/ImageRotateTask.d.ts.map +1 -0
- package/dist/task/image/ImageSchemas.d.ts +94 -0
- package/dist/task/image/ImageSchemas.d.ts.map +1 -0
- package/dist/task/image/ImageSepiaTask.d.ts +203 -0
- package/dist/task/image/ImageSepiaTask.d.ts.map +1 -0
- package/dist/task/image/ImageThresholdTask.d.ts +219 -0
- package/dist/task/image/ImageThresholdTask.d.ts.map +1 -0
- package/dist/task/image/ImageTintTask.d.ts +283 -0
- package/dist/task/image/ImageTintTask.d.ts.map +1 -0
- package/dist/task/image/ImageTransparencyTask.d.ts +217 -0
- package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -0
- package/dist/task/image/ImageWatermarkTask.d.ts +247 -0
- package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
|
|
7
|
+
import { ImageFromSchema } from "./ImageSchemas";
|
|
8
|
+
declare const inputSchema: {
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly properties: {
|
|
11
|
+
readonly image: {
|
|
12
|
+
readonly type: "object";
|
|
13
|
+
readonly properties: {
|
|
14
|
+
readonly data: {
|
|
15
|
+
readonly type: "array";
|
|
16
|
+
readonly items: {
|
|
17
|
+
readonly type: "number";
|
|
18
|
+
readonly format: "Uint8Clamped";
|
|
19
|
+
};
|
|
20
|
+
readonly format: "Uint8ClampedArray";
|
|
21
|
+
readonly title: "Data";
|
|
22
|
+
readonly description: "Pixel data of the image";
|
|
23
|
+
};
|
|
24
|
+
readonly width: {
|
|
25
|
+
readonly type: "integer";
|
|
26
|
+
readonly minimum: 1;
|
|
27
|
+
readonly title: "Width";
|
|
28
|
+
readonly description: "Width in pixels";
|
|
29
|
+
};
|
|
30
|
+
readonly height: {
|
|
31
|
+
readonly type: "integer";
|
|
32
|
+
readonly minimum: 1;
|
|
33
|
+
readonly title: "Height";
|
|
34
|
+
readonly description: "Height in pixels";
|
|
35
|
+
};
|
|
36
|
+
readonly channels: {
|
|
37
|
+
readonly type: "integer";
|
|
38
|
+
readonly enum: readonly [1, 3, 4];
|
|
39
|
+
readonly title: "Channels";
|
|
40
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly additionalProperties: false;
|
|
44
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
45
|
+
readonly format: "image:ImageBinary";
|
|
46
|
+
readonly title: "Image";
|
|
47
|
+
readonly description: "Raw pixel image data";
|
|
48
|
+
};
|
|
49
|
+
readonly color: {
|
|
50
|
+
readonly type: "object";
|
|
51
|
+
readonly properties: {
|
|
52
|
+
readonly r: {
|
|
53
|
+
readonly type: "integer";
|
|
54
|
+
readonly minimum: 0;
|
|
55
|
+
readonly maximum: 255;
|
|
56
|
+
readonly title: "Red";
|
|
57
|
+
};
|
|
58
|
+
readonly g: {
|
|
59
|
+
readonly type: "integer";
|
|
60
|
+
readonly minimum: 0;
|
|
61
|
+
readonly maximum: 255;
|
|
62
|
+
readonly title: "Green";
|
|
63
|
+
};
|
|
64
|
+
readonly b: {
|
|
65
|
+
readonly type: "integer";
|
|
66
|
+
readonly minimum: 0;
|
|
67
|
+
readonly maximum: 255;
|
|
68
|
+
readonly title: "Blue";
|
|
69
|
+
};
|
|
70
|
+
readonly a: {
|
|
71
|
+
readonly type: "integer";
|
|
72
|
+
readonly minimum: 0;
|
|
73
|
+
readonly maximum: 255;
|
|
74
|
+
readonly title: "Alpha";
|
|
75
|
+
readonly default: 255;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly required: readonly ["r", "g", "b"];
|
|
79
|
+
readonly additionalProperties: false;
|
|
80
|
+
};
|
|
81
|
+
readonly amount: {
|
|
82
|
+
readonly type: "number";
|
|
83
|
+
readonly title: "Amount";
|
|
84
|
+
readonly description: "Tint strength (0.0 = no tint, 1.0 = full tint color)";
|
|
85
|
+
readonly minimum: 0;
|
|
86
|
+
readonly maximum: 1;
|
|
87
|
+
readonly default: 0.5;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly required: readonly ["image", "color"];
|
|
91
|
+
readonly additionalProperties: false;
|
|
92
|
+
};
|
|
93
|
+
declare const outputSchema: {
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
readonly properties: {
|
|
96
|
+
readonly image: {
|
|
97
|
+
readonly type: "object";
|
|
98
|
+
readonly properties: {
|
|
99
|
+
readonly data: {
|
|
100
|
+
readonly type: "array";
|
|
101
|
+
readonly items: {
|
|
102
|
+
readonly type: "number";
|
|
103
|
+
readonly format: "Uint8Clamped";
|
|
104
|
+
};
|
|
105
|
+
readonly format: "Uint8ClampedArray";
|
|
106
|
+
readonly title: "Data";
|
|
107
|
+
readonly description: "Pixel data of the image";
|
|
108
|
+
};
|
|
109
|
+
readonly width: {
|
|
110
|
+
readonly type: "integer";
|
|
111
|
+
readonly minimum: 1;
|
|
112
|
+
readonly title: "Width";
|
|
113
|
+
readonly description: "Width in pixels";
|
|
114
|
+
};
|
|
115
|
+
readonly height: {
|
|
116
|
+
readonly type: "integer";
|
|
117
|
+
readonly minimum: 1;
|
|
118
|
+
readonly title: "Height";
|
|
119
|
+
readonly description: "Height in pixels";
|
|
120
|
+
};
|
|
121
|
+
readonly channels: {
|
|
122
|
+
readonly type: "integer";
|
|
123
|
+
readonly enum: readonly [1, 3, 4];
|
|
124
|
+
readonly title: "Channels";
|
|
125
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly additionalProperties: false;
|
|
129
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
130
|
+
readonly format: "image:ImageBinary";
|
|
131
|
+
readonly title: "Image";
|
|
132
|
+
readonly description: "Raw pixel image data";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly required: readonly ["image"];
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
};
|
|
138
|
+
export type ImageTintTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
139
|
+
export type ImageTintTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
140
|
+
export declare class ImageTintTask<Input extends ImageTintTaskInput = ImageTintTaskInput, Output extends ImageTintTaskOutput = ImageTintTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
141
|
+
static readonly type = "ImageTintTask";
|
|
142
|
+
static readonly category = "Image";
|
|
143
|
+
static title: string;
|
|
144
|
+
static description: string;
|
|
145
|
+
static inputSchema(): {
|
|
146
|
+
readonly type: "object";
|
|
147
|
+
readonly properties: {
|
|
148
|
+
readonly image: {
|
|
149
|
+
readonly type: "object";
|
|
150
|
+
readonly properties: {
|
|
151
|
+
readonly data: {
|
|
152
|
+
readonly type: "array";
|
|
153
|
+
readonly items: {
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly format: "Uint8Clamped";
|
|
156
|
+
};
|
|
157
|
+
readonly format: "Uint8ClampedArray";
|
|
158
|
+
readonly title: "Data";
|
|
159
|
+
readonly description: "Pixel data of the image";
|
|
160
|
+
};
|
|
161
|
+
readonly width: {
|
|
162
|
+
readonly type: "integer";
|
|
163
|
+
readonly minimum: 1;
|
|
164
|
+
readonly title: "Width";
|
|
165
|
+
readonly description: "Width in pixels";
|
|
166
|
+
};
|
|
167
|
+
readonly height: {
|
|
168
|
+
readonly type: "integer";
|
|
169
|
+
readonly minimum: 1;
|
|
170
|
+
readonly title: "Height";
|
|
171
|
+
readonly description: "Height in pixels";
|
|
172
|
+
};
|
|
173
|
+
readonly channels: {
|
|
174
|
+
readonly type: "integer";
|
|
175
|
+
readonly enum: readonly [1, 3, 4];
|
|
176
|
+
readonly title: "Channels";
|
|
177
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
182
|
+
readonly format: "image:ImageBinary";
|
|
183
|
+
readonly title: "Image";
|
|
184
|
+
readonly description: "Raw pixel image data";
|
|
185
|
+
};
|
|
186
|
+
readonly color: {
|
|
187
|
+
readonly type: "object";
|
|
188
|
+
readonly properties: {
|
|
189
|
+
readonly r: {
|
|
190
|
+
readonly type: "integer";
|
|
191
|
+
readonly minimum: 0;
|
|
192
|
+
readonly maximum: 255;
|
|
193
|
+
readonly title: "Red";
|
|
194
|
+
};
|
|
195
|
+
readonly g: {
|
|
196
|
+
readonly type: "integer";
|
|
197
|
+
readonly minimum: 0;
|
|
198
|
+
readonly maximum: 255;
|
|
199
|
+
readonly title: "Green";
|
|
200
|
+
};
|
|
201
|
+
readonly b: {
|
|
202
|
+
readonly type: "integer";
|
|
203
|
+
readonly minimum: 0;
|
|
204
|
+
readonly maximum: 255;
|
|
205
|
+
readonly title: "Blue";
|
|
206
|
+
};
|
|
207
|
+
readonly a: {
|
|
208
|
+
readonly type: "integer";
|
|
209
|
+
readonly minimum: 0;
|
|
210
|
+
readonly maximum: 255;
|
|
211
|
+
readonly title: "Alpha";
|
|
212
|
+
readonly default: 255;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly required: readonly ["r", "g", "b"];
|
|
216
|
+
readonly additionalProperties: false;
|
|
217
|
+
};
|
|
218
|
+
readonly amount: {
|
|
219
|
+
readonly type: "number";
|
|
220
|
+
readonly title: "Amount";
|
|
221
|
+
readonly description: "Tint strength (0.0 = no tint, 1.0 = full tint color)";
|
|
222
|
+
readonly minimum: 0;
|
|
223
|
+
readonly maximum: 1;
|
|
224
|
+
readonly default: 0.5;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly required: readonly ["image", "color"];
|
|
228
|
+
readonly additionalProperties: false;
|
|
229
|
+
};
|
|
230
|
+
static outputSchema(): {
|
|
231
|
+
readonly type: "object";
|
|
232
|
+
readonly properties: {
|
|
233
|
+
readonly image: {
|
|
234
|
+
readonly type: "object";
|
|
235
|
+
readonly properties: {
|
|
236
|
+
readonly data: {
|
|
237
|
+
readonly type: "array";
|
|
238
|
+
readonly items: {
|
|
239
|
+
readonly type: "number";
|
|
240
|
+
readonly format: "Uint8Clamped";
|
|
241
|
+
};
|
|
242
|
+
readonly format: "Uint8ClampedArray";
|
|
243
|
+
readonly title: "Data";
|
|
244
|
+
readonly description: "Pixel data of the image";
|
|
245
|
+
};
|
|
246
|
+
readonly width: {
|
|
247
|
+
readonly type: "integer";
|
|
248
|
+
readonly minimum: 1;
|
|
249
|
+
readonly title: "Width";
|
|
250
|
+
readonly description: "Width in pixels";
|
|
251
|
+
};
|
|
252
|
+
readonly height: {
|
|
253
|
+
readonly type: "integer";
|
|
254
|
+
readonly minimum: 1;
|
|
255
|
+
readonly title: "Height";
|
|
256
|
+
readonly description: "Height in pixels";
|
|
257
|
+
};
|
|
258
|
+
readonly channels: {
|
|
259
|
+
readonly type: "integer";
|
|
260
|
+
readonly enum: readonly [1, 3, 4];
|
|
261
|
+
readonly title: "Channels";
|
|
262
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly additionalProperties: false;
|
|
266
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
267
|
+
readonly format: "image:ImageBinary";
|
|
268
|
+
readonly title: "Image";
|
|
269
|
+
readonly description: "Raw pixel image data";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly required: readonly ["image"];
|
|
273
|
+
readonly additionalProperties: false;
|
|
274
|
+
};
|
|
275
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
276
|
+
}
|
|
277
|
+
declare module "@workglow/task-graph" {
|
|
278
|
+
interface Workflow {
|
|
279
|
+
imageTint: CreateWorkflow<ImageTintTaskInput, ImageTintTaskOutput, TaskConfig>;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export {};
|
|
283
|
+
//# sourceMappingURL=ImageTintTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageTintTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageTintTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAkC,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjF,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,sDAAsD;qBACnE,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,GAAG;;;;;CAKiB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvE,qBAAa,aAAa,CACxB,KAAK,SAAS,kBAAkB,GAAG,kBAAkB,EACrD,MAAM,SAAS,mBAAmB,GAAG,mBAAmB,EACxD,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,mBAAmB;IAChD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAgB;IAC5C,OAAuB,WAAW,SAAsC;IAExE,OAAgB,WAAW;uBAvCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,MAAM;yBACJ,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,sDAAsD;yBACnE,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,GAAG;;;;;MA+Bf;IAED,OAAgB,YAAY;uBAzBtB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBN;IAEc,eAAe,CAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAsCjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,SAAS,EAAE,cAAc,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC,CAAC;KAChF;CACF"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
|
|
7
|
+
import { ImageFromSchema } from "./ImageSchemas";
|
|
8
|
+
declare const inputSchema: {
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly properties: {
|
|
11
|
+
readonly image: {
|
|
12
|
+
readonly type: "object";
|
|
13
|
+
readonly properties: {
|
|
14
|
+
readonly data: {
|
|
15
|
+
readonly type: "array";
|
|
16
|
+
readonly items: {
|
|
17
|
+
readonly type: "number";
|
|
18
|
+
readonly format: "Uint8Clamped";
|
|
19
|
+
};
|
|
20
|
+
readonly format: "Uint8ClampedArray";
|
|
21
|
+
readonly title: "Data";
|
|
22
|
+
readonly description: "Pixel data of the image";
|
|
23
|
+
};
|
|
24
|
+
readonly width: {
|
|
25
|
+
readonly type: "integer";
|
|
26
|
+
readonly minimum: 1;
|
|
27
|
+
readonly title: "Width";
|
|
28
|
+
readonly description: "Width in pixels";
|
|
29
|
+
};
|
|
30
|
+
readonly height: {
|
|
31
|
+
readonly type: "integer";
|
|
32
|
+
readonly minimum: 1;
|
|
33
|
+
readonly title: "Height";
|
|
34
|
+
readonly description: "Height in pixels";
|
|
35
|
+
};
|
|
36
|
+
readonly channels: {
|
|
37
|
+
readonly type: "integer";
|
|
38
|
+
readonly enum: readonly [1, 3, 4];
|
|
39
|
+
readonly title: "Channels";
|
|
40
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly additionalProperties: false;
|
|
44
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
45
|
+
readonly format: "image:ImageBinary";
|
|
46
|
+
readonly title: "Image";
|
|
47
|
+
readonly description: "Raw pixel image data";
|
|
48
|
+
};
|
|
49
|
+
readonly opacity: {
|
|
50
|
+
readonly type: "number";
|
|
51
|
+
readonly title: "Opacity";
|
|
52
|
+
readonly description: "Opacity level (0.0 = fully transparent, 1.0 = fully opaque)";
|
|
53
|
+
readonly minimum: 0;
|
|
54
|
+
readonly maximum: 1;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly required: readonly ["image", "opacity"];
|
|
58
|
+
readonly additionalProperties: false;
|
|
59
|
+
};
|
|
60
|
+
declare const outputSchema: {
|
|
61
|
+
readonly type: "object";
|
|
62
|
+
readonly properties: {
|
|
63
|
+
readonly image: {
|
|
64
|
+
readonly type: "object";
|
|
65
|
+
readonly properties: {
|
|
66
|
+
readonly data: {
|
|
67
|
+
readonly type: "array";
|
|
68
|
+
readonly items: {
|
|
69
|
+
readonly type: "number";
|
|
70
|
+
readonly format: "Uint8Clamped";
|
|
71
|
+
};
|
|
72
|
+
readonly format: "Uint8ClampedArray";
|
|
73
|
+
readonly title: "Data";
|
|
74
|
+
readonly description: "Pixel data of the image";
|
|
75
|
+
};
|
|
76
|
+
readonly width: {
|
|
77
|
+
readonly type: "integer";
|
|
78
|
+
readonly minimum: 1;
|
|
79
|
+
readonly title: "Width";
|
|
80
|
+
readonly description: "Width in pixels";
|
|
81
|
+
};
|
|
82
|
+
readonly height: {
|
|
83
|
+
readonly type: "integer";
|
|
84
|
+
readonly minimum: 1;
|
|
85
|
+
readonly title: "Height";
|
|
86
|
+
readonly description: "Height in pixels";
|
|
87
|
+
};
|
|
88
|
+
readonly channels: {
|
|
89
|
+
readonly type: "integer";
|
|
90
|
+
readonly enum: readonly [1, 3, 4];
|
|
91
|
+
readonly title: "Channels";
|
|
92
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly additionalProperties: false;
|
|
96
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
97
|
+
readonly format: "image:ImageBinary";
|
|
98
|
+
readonly title: "Image";
|
|
99
|
+
readonly description: "Raw pixel image data";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly required: readonly ["image"];
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
};
|
|
105
|
+
export type ImageTransparencyTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
106
|
+
export type ImageTransparencyTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
107
|
+
export declare class ImageTransparencyTask<Input extends ImageTransparencyTaskInput = ImageTransparencyTaskInput, Output extends ImageTransparencyTaskOutput = ImageTransparencyTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
108
|
+
static readonly type = "ImageTransparencyTask";
|
|
109
|
+
static readonly category = "Image";
|
|
110
|
+
static title: string;
|
|
111
|
+
static description: string;
|
|
112
|
+
static inputSchema(): {
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly properties: {
|
|
115
|
+
readonly image: {
|
|
116
|
+
readonly type: "object";
|
|
117
|
+
readonly properties: {
|
|
118
|
+
readonly data: {
|
|
119
|
+
readonly type: "array";
|
|
120
|
+
readonly items: {
|
|
121
|
+
readonly type: "number";
|
|
122
|
+
readonly format: "Uint8Clamped";
|
|
123
|
+
};
|
|
124
|
+
readonly format: "Uint8ClampedArray";
|
|
125
|
+
readonly title: "Data";
|
|
126
|
+
readonly description: "Pixel data of the image";
|
|
127
|
+
};
|
|
128
|
+
readonly width: {
|
|
129
|
+
readonly type: "integer";
|
|
130
|
+
readonly minimum: 1;
|
|
131
|
+
readonly title: "Width";
|
|
132
|
+
readonly description: "Width in pixels";
|
|
133
|
+
};
|
|
134
|
+
readonly height: {
|
|
135
|
+
readonly type: "integer";
|
|
136
|
+
readonly minimum: 1;
|
|
137
|
+
readonly title: "Height";
|
|
138
|
+
readonly description: "Height in pixels";
|
|
139
|
+
};
|
|
140
|
+
readonly channels: {
|
|
141
|
+
readonly type: "integer";
|
|
142
|
+
readonly enum: readonly [1, 3, 4];
|
|
143
|
+
readonly title: "Channels";
|
|
144
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly additionalProperties: false;
|
|
148
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
149
|
+
readonly format: "image:ImageBinary";
|
|
150
|
+
readonly title: "Image";
|
|
151
|
+
readonly description: "Raw pixel image data";
|
|
152
|
+
};
|
|
153
|
+
readonly opacity: {
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly title: "Opacity";
|
|
156
|
+
readonly description: "Opacity level (0.0 = fully transparent, 1.0 = fully opaque)";
|
|
157
|
+
readonly minimum: 0;
|
|
158
|
+
readonly maximum: 1;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly required: readonly ["image", "opacity"];
|
|
162
|
+
readonly additionalProperties: false;
|
|
163
|
+
};
|
|
164
|
+
static outputSchema(): {
|
|
165
|
+
readonly type: "object";
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly image: {
|
|
168
|
+
readonly type: "object";
|
|
169
|
+
readonly properties: {
|
|
170
|
+
readonly data: {
|
|
171
|
+
readonly type: "array";
|
|
172
|
+
readonly items: {
|
|
173
|
+
readonly type: "number";
|
|
174
|
+
readonly format: "Uint8Clamped";
|
|
175
|
+
};
|
|
176
|
+
readonly format: "Uint8ClampedArray";
|
|
177
|
+
readonly title: "Data";
|
|
178
|
+
readonly description: "Pixel data of the image";
|
|
179
|
+
};
|
|
180
|
+
readonly width: {
|
|
181
|
+
readonly type: "integer";
|
|
182
|
+
readonly minimum: 1;
|
|
183
|
+
readonly title: "Width";
|
|
184
|
+
readonly description: "Width in pixels";
|
|
185
|
+
};
|
|
186
|
+
readonly height: {
|
|
187
|
+
readonly type: "integer";
|
|
188
|
+
readonly minimum: 1;
|
|
189
|
+
readonly title: "Height";
|
|
190
|
+
readonly description: "Height in pixels";
|
|
191
|
+
};
|
|
192
|
+
readonly channels: {
|
|
193
|
+
readonly type: "integer";
|
|
194
|
+
readonly enum: readonly [1, 3, 4];
|
|
195
|
+
readonly title: "Channels";
|
|
196
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly additionalProperties: false;
|
|
200
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
201
|
+
readonly format: "image:ImageBinary";
|
|
202
|
+
readonly title: "Image";
|
|
203
|
+
readonly description: "Raw pixel image data";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly required: readonly ["image"];
|
|
207
|
+
readonly additionalProperties: false;
|
|
208
|
+
};
|
|
209
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
210
|
+
}
|
|
211
|
+
declare module "@workglow/task-graph" {
|
|
212
|
+
interface Workflow {
|
|
213
|
+
imageTransparency: CreateWorkflow<ImageTransparencyTaskInput, ImageTransparencyTaskOutput, TaskConfig>;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export {};
|
|
217
|
+
//# sourceMappingURL=ImageTransparencyTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageTransparencyTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageTransparencyTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAqB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,OAAO;qBACL,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,SAAS;qBAChB,WAAW,EAAE,6DAA6D;qBAC1E,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,CAAC;;;;;CAKmB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AAC7E,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE/E,qBAAa,qBAAqB,CAChC,KAAK,SAAS,0BAA0B,GAAG,0BAA0B,EACrE,MAAM,SAAS,2BAA2B,GAAG,2BAA2B,EACxE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,2BAA2B;IACxD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAsB;IAClD,OAAuB,WAAW,SAAqC;IAEvE,OAAgB,WAAW;uBArCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,OAAO;yBACL,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,SAAS;yBAChB,WAAW,EAAE,6DAA6D;yBAC1E,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,CAAC;;;;;MA+Bb;IAED,OAAgB,YAAY;uBAzBtB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBN;IAEc,eAAe,CAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAoBjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,iBAAiB,EAAE,cAAc,CAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,UAAU,CACX,CAAC;KACH;CACF"}
|