@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,251 @@
|
|
|
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 x: {
|
|
50
|
+
readonly type: "integer";
|
|
51
|
+
readonly title: "X";
|
|
52
|
+
readonly description: "Left offset";
|
|
53
|
+
readonly minimum: 0;
|
|
54
|
+
};
|
|
55
|
+
readonly y: {
|
|
56
|
+
readonly type: "integer";
|
|
57
|
+
readonly title: "Y";
|
|
58
|
+
readonly description: "Top offset";
|
|
59
|
+
readonly minimum: 0;
|
|
60
|
+
};
|
|
61
|
+
readonly width: {
|
|
62
|
+
readonly type: "integer";
|
|
63
|
+
readonly title: "Width";
|
|
64
|
+
readonly description: "Crop width";
|
|
65
|
+
readonly minimum: 1;
|
|
66
|
+
};
|
|
67
|
+
readonly height: {
|
|
68
|
+
readonly type: "integer";
|
|
69
|
+
readonly title: "Height";
|
|
70
|
+
readonly description: "Crop height";
|
|
71
|
+
readonly minimum: 1;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly required: readonly ["image", "x", "y", "width", "height"];
|
|
75
|
+
readonly additionalProperties: false;
|
|
76
|
+
};
|
|
77
|
+
declare const outputSchema: {
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
readonly properties: {
|
|
80
|
+
readonly image: {
|
|
81
|
+
readonly type: "object";
|
|
82
|
+
readonly properties: {
|
|
83
|
+
readonly data: {
|
|
84
|
+
readonly type: "array";
|
|
85
|
+
readonly items: {
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
readonly format: "Uint8Clamped";
|
|
88
|
+
};
|
|
89
|
+
readonly format: "Uint8ClampedArray";
|
|
90
|
+
readonly title: "Data";
|
|
91
|
+
readonly description: "Pixel data of the image";
|
|
92
|
+
};
|
|
93
|
+
readonly width: {
|
|
94
|
+
readonly type: "integer";
|
|
95
|
+
readonly minimum: 1;
|
|
96
|
+
readonly title: "Width";
|
|
97
|
+
readonly description: "Width in pixels";
|
|
98
|
+
};
|
|
99
|
+
readonly height: {
|
|
100
|
+
readonly type: "integer";
|
|
101
|
+
readonly minimum: 1;
|
|
102
|
+
readonly title: "Height";
|
|
103
|
+
readonly description: "Height in pixels";
|
|
104
|
+
};
|
|
105
|
+
readonly channels: {
|
|
106
|
+
readonly type: "integer";
|
|
107
|
+
readonly enum: readonly [1, 3, 4];
|
|
108
|
+
readonly title: "Channels";
|
|
109
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly additionalProperties: false;
|
|
113
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
114
|
+
readonly format: "image:ImageBinary";
|
|
115
|
+
readonly title: "Image";
|
|
116
|
+
readonly description: "Raw pixel image data";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly required: readonly ["image"];
|
|
120
|
+
readonly additionalProperties: false;
|
|
121
|
+
};
|
|
122
|
+
export type ImageCropTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
123
|
+
export type ImageCropTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
124
|
+
export declare class ImageCropTask<Input extends ImageCropTaskInput = ImageCropTaskInput, Output extends ImageCropTaskOutput = ImageCropTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
125
|
+
static readonly type = "ImageCropTask";
|
|
126
|
+
static readonly category = "Image";
|
|
127
|
+
static title: string;
|
|
128
|
+
static description: string;
|
|
129
|
+
static inputSchema(): {
|
|
130
|
+
readonly type: "object";
|
|
131
|
+
readonly properties: {
|
|
132
|
+
readonly image: {
|
|
133
|
+
readonly type: "object";
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly data: {
|
|
136
|
+
readonly type: "array";
|
|
137
|
+
readonly items: {
|
|
138
|
+
readonly type: "number";
|
|
139
|
+
readonly format: "Uint8Clamped";
|
|
140
|
+
};
|
|
141
|
+
readonly format: "Uint8ClampedArray";
|
|
142
|
+
readonly title: "Data";
|
|
143
|
+
readonly description: "Pixel data of the image";
|
|
144
|
+
};
|
|
145
|
+
readonly width: {
|
|
146
|
+
readonly type: "integer";
|
|
147
|
+
readonly minimum: 1;
|
|
148
|
+
readonly title: "Width";
|
|
149
|
+
readonly description: "Width in pixels";
|
|
150
|
+
};
|
|
151
|
+
readonly height: {
|
|
152
|
+
readonly type: "integer";
|
|
153
|
+
readonly minimum: 1;
|
|
154
|
+
readonly title: "Height";
|
|
155
|
+
readonly description: "Height in pixels";
|
|
156
|
+
};
|
|
157
|
+
readonly channels: {
|
|
158
|
+
readonly type: "integer";
|
|
159
|
+
readonly enum: readonly [1, 3, 4];
|
|
160
|
+
readonly title: "Channels";
|
|
161
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly additionalProperties: false;
|
|
165
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
166
|
+
readonly format: "image:ImageBinary";
|
|
167
|
+
readonly title: "Image";
|
|
168
|
+
readonly description: "Raw pixel image data";
|
|
169
|
+
};
|
|
170
|
+
readonly x: {
|
|
171
|
+
readonly type: "integer";
|
|
172
|
+
readonly title: "X";
|
|
173
|
+
readonly description: "Left offset";
|
|
174
|
+
readonly minimum: 0;
|
|
175
|
+
};
|
|
176
|
+
readonly y: {
|
|
177
|
+
readonly type: "integer";
|
|
178
|
+
readonly title: "Y";
|
|
179
|
+
readonly description: "Top offset";
|
|
180
|
+
readonly minimum: 0;
|
|
181
|
+
};
|
|
182
|
+
readonly width: {
|
|
183
|
+
readonly type: "integer";
|
|
184
|
+
readonly title: "Width";
|
|
185
|
+
readonly description: "Crop width";
|
|
186
|
+
readonly minimum: 1;
|
|
187
|
+
};
|
|
188
|
+
readonly height: {
|
|
189
|
+
readonly type: "integer";
|
|
190
|
+
readonly title: "Height";
|
|
191
|
+
readonly description: "Crop height";
|
|
192
|
+
readonly minimum: 1;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly required: readonly ["image", "x", "y", "width", "height"];
|
|
196
|
+
readonly additionalProperties: false;
|
|
197
|
+
};
|
|
198
|
+
static outputSchema(): {
|
|
199
|
+
readonly type: "object";
|
|
200
|
+
readonly properties: {
|
|
201
|
+
readonly image: {
|
|
202
|
+
readonly type: "object";
|
|
203
|
+
readonly properties: {
|
|
204
|
+
readonly data: {
|
|
205
|
+
readonly type: "array";
|
|
206
|
+
readonly items: {
|
|
207
|
+
readonly type: "number";
|
|
208
|
+
readonly format: "Uint8Clamped";
|
|
209
|
+
};
|
|
210
|
+
readonly format: "Uint8ClampedArray";
|
|
211
|
+
readonly title: "Data";
|
|
212
|
+
readonly description: "Pixel data of the image";
|
|
213
|
+
};
|
|
214
|
+
readonly width: {
|
|
215
|
+
readonly type: "integer";
|
|
216
|
+
readonly minimum: 1;
|
|
217
|
+
readonly title: "Width";
|
|
218
|
+
readonly description: "Width in pixels";
|
|
219
|
+
};
|
|
220
|
+
readonly height: {
|
|
221
|
+
readonly type: "integer";
|
|
222
|
+
readonly minimum: 1;
|
|
223
|
+
readonly title: "Height";
|
|
224
|
+
readonly description: "Height in pixels";
|
|
225
|
+
};
|
|
226
|
+
readonly channels: {
|
|
227
|
+
readonly type: "integer";
|
|
228
|
+
readonly enum: readonly [1, 3, 4];
|
|
229
|
+
readonly title: "Channels";
|
|
230
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly additionalProperties: false;
|
|
234
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
235
|
+
readonly format: "image:ImageBinary";
|
|
236
|
+
readonly title: "Image";
|
|
237
|
+
readonly description: "Raw pixel image data";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly required: readonly ["image"];
|
|
241
|
+
readonly additionalProperties: false;
|
|
242
|
+
};
|
|
243
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
244
|
+
}
|
|
245
|
+
declare module "@workglow/task-graph" {
|
|
246
|
+
interface Workflow {
|
|
247
|
+
imageCrop: CreateWorkflow<ImageCropTaskInput, ImageCropTaskOutput, TaskConfig>;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
export {};
|
|
251
|
+
//# sourceMappingURL=ImageCropTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageCropTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageCropTask.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,CAAC;qBAAI,IAAI,EAAE,SAAS;qBAAE,KAAK,EAAE,GAAG;qBAAE,WAAW,EAAE,aAAa;qBAAE,OAAO,EAAE,CAAC;;iBACxE,CAAC;qBAAI,IAAI,EAAE,SAAS;qBAAE,KAAK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,EAAE,SAAS;yBAAE,KAAK,EAAE,OAAO;yBAAE,WAAW,EAAE,YAAY;yBAAE,OAAO,EAAE,CAAC;;qBAC/E,MAAM;yBAAI,IAAI,EAAE,SAAS;yBAAE,KAAK,EAAE,QAAQ;yBAAE,WAAW,EAAE,aAAa;yBAAE,OAAO,EAAE,CAAC;;;;;MA8BnF;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,CA2BjB;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,215 @@
|
|
|
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 direction: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly enum: readonly ["horizontal", "vertical"];
|
|
52
|
+
readonly title: "Direction";
|
|
53
|
+
readonly description: "Flip direction";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["image", "direction"];
|
|
57
|
+
readonly additionalProperties: false;
|
|
58
|
+
};
|
|
59
|
+
declare const outputSchema: {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
readonly properties: {
|
|
62
|
+
readonly image: {
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
readonly properties: {
|
|
65
|
+
readonly data: {
|
|
66
|
+
readonly type: "array";
|
|
67
|
+
readonly items: {
|
|
68
|
+
readonly type: "number";
|
|
69
|
+
readonly format: "Uint8Clamped";
|
|
70
|
+
};
|
|
71
|
+
readonly format: "Uint8ClampedArray";
|
|
72
|
+
readonly title: "Data";
|
|
73
|
+
readonly description: "Pixel data of the image";
|
|
74
|
+
};
|
|
75
|
+
readonly width: {
|
|
76
|
+
readonly type: "integer";
|
|
77
|
+
readonly minimum: 1;
|
|
78
|
+
readonly title: "Width";
|
|
79
|
+
readonly description: "Width in pixels";
|
|
80
|
+
};
|
|
81
|
+
readonly height: {
|
|
82
|
+
readonly type: "integer";
|
|
83
|
+
readonly minimum: 1;
|
|
84
|
+
readonly title: "Height";
|
|
85
|
+
readonly description: "Height in pixels";
|
|
86
|
+
};
|
|
87
|
+
readonly channels: {
|
|
88
|
+
readonly type: "integer";
|
|
89
|
+
readonly enum: readonly [1, 3, 4];
|
|
90
|
+
readonly title: "Channels";
|
|
91
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
readonly additionalProperties: false;
|
|
95
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
96
|
+
readonly format: "image:ImageBinary";
|
|
97
|
+
readonly title: "Image";
|
|
98
|
+
readonly description: "Raw pixel image data";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly required: readonly ["image"];
|
|
102
|
+
readonly additionalProperties: false;
|
|
103
|
+
};
|
|
104
|
+
export type ImageFlipTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
105
|
+
export type ImageFlipTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
106
|
+
export declare class ImageFlipTask<Input extends ImageFlipTaskInput = ImageFlipTaskInput, Output extends ImageFlipTaskOutput = ImageFlipTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
107
|
+
static readonly type = "ImageFlipTask";
|
|
108
|
+
static readonly category = "Image";
|
|
109
|
+
static title: string;
|
|
110
|
+
static description: string;
|
|
111
|
+
static inputSchema(): {
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly image: {
|
|
115
|
+
readonly type: "object";
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly data: {
|
|
118
|
+
readonly type: "array";
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly type: "number";
|
|
121
|
+
readonly format: "Uint8Clamped";
|
|
122
|
+
};
|
|
123
|
+
readonly format: "Uint8ClampedArray";
|
|
124
|
+
readonly title: "Data";
|
|
125
|
+
readonly description: "Pixel data of the image";
|
|
126
|
+
};
|
|
127
|
+
readonly width: {
|
|
128
|
+
readonly type: "integer";
|
|
129
|
+
readonly minimum: 1;
|
|
130
|
+
readonly title: "Width";
|
|
131
|
+
readonly description: "Width in pixels";
|
|
132
|
+
};
|
|
133
|
+
readonly height: {
|
|
134
|
+
readonly type: "integer";
|
|
135
|
+
readonly minimum: 1;
|
|
136
|
+
readonly title: "Height";
|
|
137
|
+
readonly description: "Height in pixels";
|
|
138
|
+
};
|
|
139
|
+
readonly channels: {
|
|
140
|
+
readonly type: "integer";
|
|
141
|
+
readonly enum: readonly [1, 3, 4];
|
|
142
|
+
readonly title: "Channels";
|
|
143
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly additionalProperties: false;
|
|
147
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
148
|
+
readonly format: "image:ImageBinary";
|
|
149
|
+
readonly title: "Image";
|
|
150
|
+
readonly description: "Raw pixel image data";
|
|
151
|
+
};
|
|
152
|
+
readonly direction: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly enum: readonly ["horizontal", "vertical"];
|
|
155
|
+
readonly title: "Direction";
|
|
156
|
+
readonly description: "Flip direction";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly required: readonly ["image", "direction"];
|
|
160
|
+
readonly additionalProperties: false;
|
|
161
|
+
};
|
|
162
|
+
static outputSchema(): {
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly properties: {
|
|
165
|
+
readonly image: {
|
|
166
|
+
readonly type: "object";
|
|
167
|
+
readonly properties: {
|
|
168
|
+
readonly data: {
|
|
169
|
+
readonly type: "array";
|
|
170
|
+
readonly items: {
|
|
171
|
+
readonly type: "number";
|
|
172
|
+
readonly format: "Uint8Clamped";
|
|
173
|
+
};
|
|
174
|
+
readonly format: "Uint8ClampedArray";
|
|
175
|
+
readonly title: "Data";
|
|
176
|
+
readonly description: "Pixel data of the image";
|
|
177
|
+
};
|
|
178
|
+
readonly width: {
|
|
179
|
+
readonly type: "integer";
|
|
180
|
+
readonly minimum: 1;
|
|
181
|
+
readonly title: "Width";
|
|
182
|
+
readonly description: "Width in pixels";
|
|
183
|
+
};
|
|
184
|
+
readonly height: {
|
|
185
|
+
readonly type: "integer";
|
|
186
|
+
readonly minimum: 1;
|
|
187
|
+
readonly title: "Height";
|
|
188
|
+
readonly description: "Height in pixels";
|
|
189
|
+
};
|
|
190
|
+
readonly channels: {
|
|
191
|
+
readonly type: "integer";
|
|
192
|
+
readonly enum: readonly [1, 3, 4];
|
|
193
|
+
readonly title: "Channels";
|
|
194
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
readonly additionalProperties: false;
|
|
198
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
199
|
+
readonly format: "image:ImageBinary";
|
|
200
|
+
readonly title: "Image";
|
|
201
|
+
readonly description: "Raw pixel image data";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
readonly required: readonly ["image"];
|
|
205
|
+
readonly additionalProperties: false;
|
|
206
|
+
};
|
|
207
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
208
|
+
}
|
|
209
|
+
declare module "@workglow/task-graph" {
|
|
210
|
+
interface Workflow {
|
|
211
|
+
imageFlip: CreateWorkflow<ImageFlipTaskInput, ImageFlipTaskOutput, TaskConfig>;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
export {};
|
|
215
|
+
//# sourceMappingURL=ImageFlipTask.d.ts.map
|
|
@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AAW,EAAE,gBAAgB;;;;;MA+BhC;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,CAyBjB;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,203 @@
|
|
|
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
|
+
};
|
|
50
|
+
readonly required: readonly ["image"];
|
|
51
|
+
readonly additionalProperties: false;
|
|
52
|
+
};
|
|
53
|
+
declare const outputSchema: {
|
|
54
|
+
readonly type: "object";
|
|
55
|
+
readonly properties: {
|
|
56
|
+
readonly image: {
|
|
57
|
+
readonly type: "object";
|
|
58
|
+
readonly properties: {
|
|
59
|
+
readonly data: {
|
|
60
|
+
readonly type: "array";
|
|
61
|
+
readonly items: {
|
|
62
|
+
readonly type: "number";
|
|
63
|
+
readonly format: "Uint8Clamped";
|
|
64
|
+
};
|
|
65
|
+
readonly format: "Uint8ClampedArray";
|
|
66
|
+
readonly title: "Data";
|
|
67
|
+
readonly description: "Pixel data of the image";
|
|
68
|
+
};
|
|
69
|
+
readonly width: {
|
|
70
|
+
readonly type: "integer";
|
|
71
|
+
readonly minimum: 1;
|
|
72
|
+
readonly title: "Width";
|
|
73
|
+
readonly description: "Width in pixels";
|
|
74
|
+
};
|
|
75
|
+
readonly height: {
|
|
76
|
+
readonly type: "integer";
|
|
77
|
+
readonly minimum: 1;
|
|
78
|
+
readonly title: "Height";
|
|
79
|
+
readonly description: "Height in pixels";
|
|
80
|
+
};
|
|
81
|
+
readonly channels: {
|
|
82
|
+
readonly type: "integer";
|
|
83
|
+
readonly enum: readonly [1, 3, 4];
|
|
84
|
+
readonly title: "Channels";
|
|
85
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly additionalProperties: false;
|
|
89
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
90
|
+
readonly format: "image:ImageBinary";
|
|
91
|
+
readonly title: "Image";
|
|
92
|
+
readonly description: "Raw pixel image data";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly required: readonly ["image"];
|
|
96
|
+
readonly additionalProperties: false;
|
|
97
|
+
};
|
|
98
|
+
export type ImageGrayscaleTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
99
|
+
export type ImageGrayscaleTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
100
|
+
export declare class ImageGrayscaleTask<Input extends ImageGrayscaleTaskInput = ImageGrayscaleTaskInput, Output extends ImageGrayscaleTaskOutput = ImageGrayscaleTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
101
|
+
static readonly type = "ImageGrayscaleTask";
|
|
102
|
+
static readonly category = "Image";
|
|
103
|
+
static title: string;
|
|
104
|
+
static description: string;
|
|
105
|
+
static inputSchema(): {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly properties: {
|
|
108
|
+
readonly image: {
|
|
109
|
+
readonly type: "object";
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly data: {
|
|
112
|
+
readonly type: "array";
|
|
113
|
+
readonly items: {
|
|
114
|
+
readonly type: "number";
|
|
115
|
+
readonly format: "Uint8Clamped";
|
|
116
|
+
};
|
|
117
|
+
readonly format: "Uint8ClampedArray";
|
|
118
|
+
readonly title: "Data";
|
|
119
|
+
readonly description: "Pixel data of the image";
|
|
120
|
+
};
|
|
121
|
+
readonly width: {
|
|
122
|
+
readonly type: "integer";
|
|
123
|
+
readonly minimum: 1;
|
|
124
|
+
readonly title: "Width";
|
|
125
|
+
readonly description: "Width in pixels";
|
|
126
|
+
};
|
|
127
|
+
readonly height: {
|
|
128
|
+
readonly type: "integer";
|
|
129
|
+
readonly minimum: 1;
|
|
130
|
+
readonly title: "Height";
|
|
131
|
+
readonly description: "Height in pixels";
|
|
132
|
+
};
|
|
133
|
+
readonly channels: {
|
|
134
|
+
readonly type: "integer";
|
|
135
|
+
readonly enum: readonly [1, 3, 4];
|
|
136
|
+
readonly title: "Channels";
|
|
137
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly additionalProperties: false;
|
|
141
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
142
|
+
readonly format: "image:ImageBinary";
|
|
143
|
+
readonly title: "Image";
|
|
144
|
+
readonly description: "Raw pixel image data";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly required: readonly ["image"];
|
|
148
|
+
readonly additionalProperties: false;
|
|
149
|
+
};
|
|
150
|
+
static outputSchema(): {
|
|
151
|
+
readonly type: "object";
|
|
152
|
+
readonly properties: {
|
|
153
|
+
readonly image: {
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
readonly properties: {
|
|
156
|
+
readonly data: {
|
|
157
|
+
readonly type: "array";
|
|
158
|
+
readonly items: {
|
|
159
|
+
readonly type: "number";
|
|
160
|
+
readonly format: "Uint8Clamped";
|
|
161
|
+
};
|
|
162
|
+
readonly format: "Uint8ClampedArray";
|
|
163
|
+
readonly title: "Data";
|
|
164
|
+
readonly description: "Pixel data of the image";
|
|
165
|
+
};
|
|
166
|
+
readonly width: {
|
|
167
|
+
readonly type: "integer";
|
|
168
|
+
readonly minimum: 1;
|
|
169
|
+
readonly title: "Width";
|
|
170
|
+
readonly description: "Width in pixels";
|
|
171
|
+
};
|
|
172
|
+
readonly height: {
|
|
173
|
+
readonly type: "integer";
|
|
174
|
+
readonly minimum: 1;
|
|
175
|
+
readonly title: "Height";
|
|
176
|
+
readonly description: "Height in pixels";
|
|
177
|
+
};
|
|
178
|
+
readonly channels: {
|
|
179
|
+
readonly type: "integer";
|
|
180
|
+
readonly enum: readonly [1, 3, 4];
|
|
181
|
+
readonly title: "Channels";
|
|
182
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly additionalProperties: false;
|
|
186
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
187
|
+
readonly format: "image:ImageBinary";
|
|
188
|
+
readonly title: "Image";
|
|
189
|
+
readonly description: "Raw pixel image data";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly required: readonly ["image"];
|
|
193
|
+
readonly additionalProperties: false;
|
|
194
|
+
};
|
|
195
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
196
|
+
}
|
|
197
|
+
declare module "@workglow/task-graph" {
|
|
198
|
+
interface Workflow {
|
|
199
|
+
imageGrayscale: CreateWorkflow<ImageGrayscaleTaskInput, ImageGrayscaleTaskOutput, TaskConfig>;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
export {};
|
|
203
|
+
//# sourceMappingURL=ImageGrayscaleTask.d.ts.map
|