@workglow/tasks 0.2.0 → 0.2.2
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 +4 -3
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +9406 -7907
- package/dist/browser.js.map +55 -32
- package/dist/bun.d.ts +4 -3
- package/dist/bun.d.ts.map +1 -1
- package/dist/bun.js +9369 -7898
- package/dist/bun.js.map +56 -33
- package/dist/common.d.ts +77 -39
- package/dist/common.d.ts.map +1 -1
- package/dist/node.d.ts +4 -3
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +9369 -7898
- package/dist/node.js.map +56 -33
- package/dist/task/FetchUrlTask.d.ts.map +1 -1
- package/dist/task/FileLoaderTask.d.ts +2 -2
- package/dist/task/FileLoaderTask.d.ts.map +1 -1
- package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
- package/dist/task/image/ImageBlurTask.d.ts +247 -0
- package/dist/task/image/ImageBlurTask.d.ts.map +1 -0
- package/dist/task/image/ImageBorderTask.d.ts +309 -0
- package/dist/task/image/ImageBorderTask.d.ts.map +1 -0
- package/dist/task/image/ImageBrightnessTask.d.ts +247 -0
- package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -0
- package/dist/task/image/ImageContrastTask.d.ts +247 -0
- package/dist/task/image/ImageContrastTask.d.ts.map +1 -0
- package/dist/task/image/ImageCropTask.d.ts +279 -0
- package/dist/task/image/ImageCropTask.d.ts.map +1 -0
- package/dist/task/image/ImageFlipTask.d.ts +243 -0
- package/dist/task/image/ImageFlipTask.d.ts.map +1 -0
- package/dist/task/image/ImageGrayscaleTask.d.ts +231 -0
- package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -0
- package/dist/task/image/ImageInvertTask.d.ts +231 -0
- package/dist/task/image/ImageInvertTask.d.ts.map +1 -0
- package/dist/task/image/ImagePixelateTask.d.ts +245 -0
- package/dist/task/image/ImagePixelateTask.d.ts.map +1 -0
- package/dist/task/image/ImagePosterizeTask.d.ts +247 -0
- package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -0
- package/dist/task/image/ImageResizeTask.d.ts +255 -0
- package/dist/task/image/ImageResizeTask.d.ts.map +1 -0
- package/dist/task/image/ImageRotateTask.d.ts +243 -0
- package/dist/task/image/ImageRotateTask.d.ts.map +1 -0
- package/dist/task/image/ImageSchemas.d.ts +140 -0
- package/dist/task/image/ImageSchemas.d.ts.map +1 -0
- package/dist/task/image/ImageSepiaTask.d.ts +231 -0
- package/dist/task/image/ImageSepiaTask.d.ts.map +1 -0
- package/dist/task/image/ImageThresholdTask.d.ts +247 -0
- package/dist/task/image/ImageThresholdTask.d.ts.map +1 -0
- package/dist/task/image/ImageTintTask.d.ts +311 -0
- package/dist/task/image/ImageTintTask.d.ts.map +1 -0
- package/dist/task/image/ImageTransparencyTask.d.ts +245 -0
- package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -0
- package/dist/task/image/ImageWatermarkTask.d.ts +275 -0
- package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecBrowser.d.ts +8 -0
- package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecNode.d.ts +8 -0
- package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecRegistry.d.ts +13 -0
- package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -0
- package/dist/task/image/imageTaskIo.d.ts +12 -0
- package/dist/task/image/imageTaskIo.d.ts.map +1 -0
- package/dist/task/image/imageTaskTransport.d.ts +21 -0
- package/dist/task/image/imageTaskTransport.d.ts.map +1 -0
- package/dist/task/image/registerImageRasterCodec.browser.d.ts +7 -0
- package/dist/task/image/registerImageRasterCodec.browser.d.ts.map +1 -0
- package/dist/task/image/registerImageRasterCodec.node.d.ts +7 -0
- package/dist/task/image/registerImageRasterCodec.node.d.ts.map +1 -0
- package/package.json +12 -11
|
@@ -0,0 +1,247 @@
|
|
|
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 oneOf: readonly [{
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly data: {
|
|
16
|
+
readonly type: "array";
|
|
17
|
+
readonly items: {
|
|
18
|
+
readonly type: "number";
|
|
19
|
+
readonly format: "Uint8Clamped";
|
|
20
|
+
};
|
|
21
|
+
readonly format: "Uint8ClampedArray";
|
|
22
|
+
readonly title: "Data";
|
|
23
|
+
readonly description: "Pixel data of the image";
|
|
24
|
+
};
|
|
25
|
+
readonly width: {
|
|
26
|
+
readonly type: "integer";
|
|
27
|
+
readonly minimum: 1;
|
|
28
|
+
readonly title: "Width";
|
|
29
|
+
readonly description: "Width in pixels";
|
|
30
|
+
};
|
|
31
|
+
readonly height: {
|
|
32
|
+
readonly type: "integer";
|
|
33
|
+
readonly minimum: 1;
|
|
34
|
+
readonly title: "Height";
|
|
35
|
+
readonly description: "Height in pixels";
|
|
36
|
+
};
|
|
37
|
+
readonly channels: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly enum: readonly [1, 3, 4];
|
|
40
|
+
readonly title: "Channels";
|
|
41
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly additionalProperties: false;
|
|
45
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
46
|
+
readonly format: "image:ImageBinary";
|
|
47
|
+
readonly title: "Image";
|
|
48
|
+
readonly description: "Raw pixel image data";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly format: "image:data-uri";
|
|
52
|
+
readonly title: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
}];
|
|
55
|
+
};
|
|
56
|
+
readonly amount: {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
readonly title: "Amount";
|
|
59
|
+
readonly description: "Brightness adjustment (-255 to 255)";
|
|
60
|
+
readonly minimum: -255;
|
|
61
|
+
readonly maximum: 255;
|
|
62
|
+
readonly default: 0;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly required: readonly ["image"];
|
|
66
|
+
readonly additionalProperties: false;
|
|
67
|
+
};
|
|
68
|
+
declare const outputSchema: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly properties: {
|
|
71
|
+
readonly image: {
|
|
72
|
+
readonly oneOf: readonly [{
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly data: {
|
|
76
|
+
readonly type: "array";
|
|
77
|
+
readonly items: {
|
|
78
|
+
readonly type: "number";
|
|
79
|
+
readonly format: "Uint8Clamped";
|
|
80
|
+
};
|
|
81
|
+
readonly format: "Uint8ClampedArray";
|
|
82
|
+
readonly title: "Data";
|
|
83
|
+
readonly description: "Pixel data of the image";
|
|
84
|
+
};
|
|
85
|
+
readonly width: {
|
|
86
|
+
readonly type: "integer";
|
|
87
|
+
readonly minimum: 1;
|
|
88
|
+
readonly title: "Width";
|
|
89
|
+
readonly description: "Width in pixels";
|
|
90
|
+
};
|
|
91
|
+
readonly height: {
|
|
92
|
+
readonly type: "integer";
|
|
93
|
+
readonly minimum: 1;
|
|
94
|
+
readonly title: "Height";
|
|
95
|
+
readonly description: "Height in pixels";
|
|
96
|
+
};
|
|
97
|
+
readonly channels: {
|
|
98
|
+
readonly type: "integer";
|
|
99
|
+
readonly enum: readonly [1, 3, 4];
|
|
100
|
+
readonly title: "Channels";
|
|
101
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
106
|
+
readonly format: "image:ImageBinary";
|
|
107
|
+
readonly title: "Image";
|
|
108
|
+
readonly description: "Raw pixel image data";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly format: "image:data-uri";
|
|
112
|
+
readonly title: string;
|
|
113
|
+
readonly description: string;
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly required: readonly ["image"];
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
};
|
|
120
|
+
export type ImageBrightnessTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
121
|
+
export type ImageBrightnessTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
122
|
+
export declare class ImageBrightnessTask<Input extends ImageBrightnessTaskInput = ImageBrightnessTaskInput, Output extends ImageBrightnessTaskOutput = ImageBrightnessTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
123
|
+
static readonly type = "ImageBrightnessTask";
|
|
124
|
+
static readonly category = "Image";
|
|
125
|
+
static title: string;
|
|
126
|
+
static description: string;
|
|
127
|
+
static inputSchema(): {
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly image: {
|
|
131
|
+
readonly oneOf: readonly [{
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly data: {
|
|
135
|
+
readonly type: "array";
|
|
136
|
+
readonly items: {
|
|
137
|
+
readonly type: "number";
|
|
138
|
+
readonly format: "Uint8Clamped";
|
|
139
|
+
};
|
|
140
|
+
readonly format: "Uint8ClampedArray";
|
|
141
|
+
readonly title: "Data";
|
|
142
|
+
readonly description: "Pixel data of the image";
|
|
143
|
+
};
|
|
144
|
+
readonly width: {
|
|
145
|
+
readonly type: "integer";
|
|
146
|
+
readonly minimum: 1;
|
|
147
|
+
readonly title: "Width";
|
|
148
|
+
readonly description: "Width in pixels";
|
|
149
|
+
};
|
|
150
|
+
readonly height: {
|
|
151
|
+
readonly type: "integer";
|
|
152
|
+
readonly minimum: 1;
|
|
153
|
+
readonly title: "Height";
|
|
154
|
+
readonly description: "Height in pixels";
|
|
155
|
+
};
|
|
156
|
+
readonly channels: {
|
|
157
|
+
readonly type: "integer";
|
|
158
|
+
readonly enum: readonly [1, 3, 4];
|
|
159
|
+
readonly title: "Channels";
|
|
160
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
165
|
+
readonly format: "image:ImageBinary";
|
|
166
|
+
readonly title: "Image";
|
|
167
|
+
readonly description: "Raw pixel image data";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly format: "image:data-uri";
|
|
171
|
+
readonly title: string;
|
|
172
|
+
readonly description: string;
|
|
173
|
+
}];
|
|
174
|
+
};
|
|
175
|
+
readonly amount: {
|
|
176
|
+
readonly type: "number";
|
|
177
|
+
readonly title: "Amount";
|
|
178
|
+
readonly description: "Brightness adjustment (-255 to 255)";
|
|
179
|
+
readonly minimum: -255;
|
|
180
|
+
readonly maximum: 255;
|
|
181
|
+
readonly default: 0;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly required: readonly ["image"];
|
|
185
|
+
readonly additionalProperties: false;
|
|
186
|
+
};
|
|
187
|
+
static outputSchema(): {
|
|
188
|
+
readonly type: "object";
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly image: {
|
|
191
|
+
readonly oneOf: readonly [{
|
|
192
|
+
readonly type: "object";
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly data: {
|
|
195
|
+
readonly type: "array";
|
|
196
|
+
readonly items: {
|
|
197
|
+
readonly type: "number";
|
|
198
|
+
readonly format: "Uint8Clamped";
|
|
199
|
+
};
|
|
200
|
+
readonly format: "Uint8ClampedArray";
|
|
201
|
+
readonly title: "Data";
|
|
202
|
+
readonly description: "Pixel data of the image";
|
|
203
|
+
};
|
|
204
|
+
readonly width: {
|
|
205
|
+
readonly type: "integer";
|
|
206
|
+
readonly minimum: 1;
|
|
207
|
+
readonly title: "Width";
|
|
208
|
+
readonly description: "Width in pixels";
|
|
209
|
+
};
|
|
210
|
+
readonly height: {
|
|
211
|
+
readonly type: "integer";
|
|
212
|
+
readonly minimum: 1;
|
|
213
|
+
readonly title: "Height";
|
|
214
|
+
readonly description: "Height in pixels";
|
|
215
|
+
};
|
|
216
|
+
readonly channels: {
|
|
217
|
+
readonly type: "integer";
|
|
218
|
+
readonly enum: readonly [1, 3, 4];
|
|
219
|
+
readonly title: "Channels";
|
|
220
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly additionalProperties: false;
|
|
224
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
225
|
+
readonly format: "image:ImageBinary";
|
|
226
|
+
readonly title: "Image";
|
|
227
|
+
readonly description: "Raw pixel image data";
|
|
228
|
+
}, {
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly format: "image:data-uri";
|
|
231
|
+
readonly title: string;
|
|
232
|
+
readonly description: string;
|
|
233
|
+
}];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
readonly required: readonly ["image"];
|
|
237
|
+
readonly additionalProperties: false;
|
|
238
|
+
};
|
|
239
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
240
|
+
}
|
|
241
|
+
declare module "@workglow/task-graph" {
|
|
242
|
+
interface Workflow {
|
|
243
|
+
imageBrightness: CreateWorkflow<ImageBrightnessTaskInput, ImageBrightnessTaskOutput, TaskConfig>;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
export {};
|
|
247
|
+
//# sourceMappingURL=ImageBrightnessTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageBrightnessTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageBrightnessTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAA8B,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG7E,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,qCAAqC;qBAClD,OAAO,EAAE,CAAC,GAAG;qBACb,OAAO,EAAE,GAAG;qBACZ,OAAO,EAAE,CAAC;;;;;CAKmB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7E,qBAAa,mBAAmB,CAC9B,KAAK,SAAS,wBAAwB,GAAG,wBAAwB,EACjE,MAAM,SAAS,yBAAyB,GAAG,yBAAyB,EACpE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,yBAAyB;IACtD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAuB;IACnD,OAAuB,WAAW,SAAwC;IAE1E,OAAgB,WAAW;uBAtCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,MAAM;yBACJ,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,qCAAqC;yBAClD,OAAO,EAAE,CAAC,GAAG;yBACb,OAAO,EAAE,GAAG;yBACZ,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,CAsBjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,eAAe,EAAE,cAAc,CAC7B,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,CACX,CAAC;KACH;CACF"}
|
|
@@ -0,0 +1,247 @@
|
|
|
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 oneOf: readonly [{
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly data: {
|
|
16
|
+
readonly type: "array";
|
|
17
|
+
readonly items: {
|
|
18
|
+
readonly type: "number";
|
|
19
|
+
readonly format: "Uint8Clamped";
|
|
20
|
+
};
|
|
21
|
+
readonly format: "Uint8ClampedArray";
|
|
22
|
+
readonly title: "Data";
|
|
23
|
+
readonly description: "Pixel data of the image";
|
|
24
|
+
};
|
|
25
|
+
readonly width: {
|
|
26
|
+
readonly type: "integer";
|
|
27
|
+
readonly minimum: 1;
|
|
28
|
+
readonly title: "Width";
|
|
29
|
+
readonly description: "Width in pixels";
|
|
30
|
+
};
|
|
31
|
+
readonly height: {
|
|
32
|
+
readonly type: "integer";
|
|
33
|
+
readonly minimum: 1;
|
|
34
|
+
readonly title: "Height";
|
|
35
|
+
readonly description: "Height in pixels";
|
|
36
|
+
};
|
|
37
|
+
readonly channels: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly enum: readonly [1, 3, 4];
|
|
40
|
+
readonly title: "Channels";
|
|
41
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly additionalProperties: false;
|
|
45
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
46
|
+
readonly format: "image:ImageBinary";
|
|
47
|
+
readonly title: "Image";
|
|
48
|
+
readonly description: "Raw pixel image data";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly format: "image:data-uri";
|
|
52
|
+
readonly title: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
}];
|
|
55
|
+
};
|
|
56
|
+
readonly amount: {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
readonly title: "Amount";
|
|
59
|
+
readonly description: "Contrast adjustment (-100 to 100)";
|
|
60
|
+
readonly minimum: -100;
|
|
61
|
+
readonly maximum: 100;
|
|
62
|
+
readonly default: 0;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly required: readonly ["image"];
|
|
66
|
+
readonly additionalProperties: false;
|
|
67
|
+
};
|
|
68
|
+
declare const outputSchema: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly properties: {
|
|
71
|
+
readonly image: {
|
|
72
|
+
readonly oneOf: readonly [{
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly data: {
|
|
76
|
+
readonly type: "array";
|
|
77
|
+
readonly items: {
|
|
78
|
+
readonly type: "number";
|
|
79
|
+
readonly format: "Uint8Clamped";
|
|
80
|
+
};
|
|
81
|
+
readonly format: "Uint8ClampedArray";
|
|
82
|
+
readonly title: "Data";
|
|
83
|
+
readonly description: "Pixel data of the image";
|
|
84
|
+
};
|
|
85
|
+
readonly width: {
|
|
86
|
+
readonly type: "integer";
|
|
87
|
+
readonly minimum: 1;
|
|
88
|
+
readonly title: "Width";
|
|
89
|
+
readonly description: "Width in pixels";
|
|
90
|
+
};
|
|
91
|
+
readonly height: {
|
|
92
|
+
readonly type: "integer";
|
|
93
|
+
readonly minimum: 1;
|
|
94
|
+
readonly title: "Height";
|
|
95
|
+
readonly description: "Height in pixels";
|
|
96
|
+
};
|
|
97
|
+
readonly channels: {
|
|
98
|
+
readonly type: "integer";
|
|
99
|
+
readonly enum: readonly [1, 3, 4];
|
|
100
|
+
readonly title: "Channels";
|
|
101
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
106
|
+
readonly format: "image:ImageBinary";
|
|
107
|
+
readonly title: "Image";
|
|
108
|
+
readonly description: "Raw pixel image data";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly format: "image:data-uri";
|
|
112
|
+
readonly title: string;
|
|
113
|
+
readonly description: string;
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly required: readonly ["image"];
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
};
|
|
120
|
+
export type ImageContrastTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
121
|
+
export type ImageContrastTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
122
|
+
export declare class ImageContrastTask<Input extends ImageContrastTaskInput = ImageContrastTaskInput, Output extends ImageContrastTaskOutput = ImageContrastTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
123
|
+
static readonly type = "ImageContrastTask";
|
|
124
|
+
static readonly category = "Image";
|
|
125
|
+
static title: string;
|
|
126
|
+
static description: string;
|
|
127
|
+
static inputSchema(): {
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly image: {
|
|
131
|
+
readonly oneOf: readonly [{
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly data: {
|
|
135
|
+
readonly type: "array";
|
|
136
|
+
readonly items: {
|
|
137
|
+
readonly type: "number";
|
|
138
|
+
readonly format: "Uint8Clamped";
|
|
139
|
+
};
|
|
140
|
+
readonly format: "Uint8ClampedArray";
|
|
141
|
+
readonly title: "Data";
|
|
142
|
+
readonly description: "Pixel data of the image";
|
|
143
|
+
};
|
|
144
|
+
readonly width: {
|
|
145
|
+
readonly type: "integer";
|
|
146
|
+
readonly minimum: 1;
|
|
147
|
+
readonly title: "Width";
|
|
148
|
+
readonly description: "Width in pixels";
|
|
149
|
+
};
|
|
150
|
+
readonly height: {
|
|
151
|
+
readonly type: "integer";
|
|
152
|
+
readonly minimum: 1;
|
|
153
|
+
readonly title: "Height";
|
|
154
|
+
readonly description: "Height in pixels";
|
|
155
|
+
};
|
|
156
|
+
readonly channels: {
|
|
157
|
+
readonly type: "integer";
|
|
158
|
+
readonly enum: readonly [1, 3, 4];
|
|
159
|
+
readonly title: "Channels";
|
|
160
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
165
|
+
readonly format: "image:ImageBinary";
|
|
166
|
+
readonly title: "Image";
|
|
167
|
+
readonly description: "Raw pixel image data";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly format: "image:data-uri";
|
|
171
|
+
readonly title: string;
|
|
172
|
+
readonly description: string;
|
|
173
|
+
}];
|
|
174
|
+
};
|
|
175
|
+
readonly amount: {
|
|
176
|
+
readonly type: "number";
|
|
177
|
+
readonly title: "Amount";
|
|
178
|
+
readonly description: "Contrast adjustment (-100 to 100)";
|
|
179
|
+
readonly minimum: -100;
|
|
180
|
+
readonly maximum: 100;
|
|
181
|
+
readonly default: 0;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly required: readonly ["image"];
|
|
185
|
+
readonly additionalProperties: false;
|
|
186
|
+
};
|
|
187
|
+
static outputSchema(): {
|
|
188
|
+
readonly type: "object";
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly image: {
|
|
191
|
+
readonly oneOf: readonly [{
|
|
192
|
+
readonly type: "object";
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly data: {
|
|
195
|
+
readonly type: "array";
|
|
196
|
+
readonly items: {
|
|
197
|
+
readonly type: "number";
|
|
198
|
+
readonly format: "Uint8Clamped";
|
|
199
|
+
};
|
|
200
|
+
readonly format: "Uint8ClampedArray";
|
|
201
|
+
readonly title: "Data";
|
|
202
|
+
readonly description: "Pixel data of the image";
|
|
203
|
+
};
|
|
204
|
+
readonly width: {
|
|
205
|
+
readonly type: "integer";
|
|
206
|
+
readonly minimum: 1;
|
|
207
|
+
readonly title: "Width";
|
|
208
|
+
readonly description: "Width in pixels";
|
|
209
|
+
};
|
|
210
|
+
readonly height: {
|
|
211
|
+
readonly type: "integer";
|
|
212
|
+
readonly minimum: 1;
|
|
213
|
+
readonly title: "Height";
|
|
214
|
+
readonly description: "Height in pixels";
|
|
215
|
+
};
|
|
216
|
+
readonly channels: {
|
|
217
|
+
readonly type: "integer";
|
|
218
|
+
readonly enum: readonly [1, 3, 4];
|
|
219
|
+
readonly title: "Channels";
|
|
220
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly additionalProperties: false;
|
|
224
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
225
|
+
readonly format: "image:ImageBinary";
|
|
226
|
+
readonly title: "Image";
|
|
227
|
+
readonly description: "Raw pixel image data";
|
|
228
|
+
}, {
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly format: "image:data-uri";
|
|
231
|
+
readonly title: string;
|
|
232
|
+
readonly description: string;
|
|
233
|
+
}];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
readonly required: readonly ["image"];
|
|
237
|
+
readonly additionalProperties: false;
|
|
238
|
+
};
|
|
239
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
240
|
+
}
|
|
241
|
+
declare module "@workglow/task-graph" {
|
|
242
|
+
interface Workflow {
|
|
243
|
+
imageContrast: CreateWorkflow<ImageContrastTaskInput, ImageContrastTaskOutput, TaskConfig>;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
export {};
|
|
247
|
+
//# sourceMappingURL=ImageContrastTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageContrastTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageContrastTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAA8B,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG7E,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,mCAAmC;qBAChD,OAAO,EAAE,CAAC,GAAG;qBACb,OAAO,EAAE,GAAG;qBACZ,OAAO,EAAE,CAAC;;;;;CAKmB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AACzE,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3E,qBAAa,iBAAiB,CAC5B,KAAK,SAAS,sBAAsB,GAAG,sBAAsB,EAC7D,MAAM,SAAS,uBAAuB,GAAG,uBAAuB,EAChE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,uBAAuB;IACpD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAqB;IACjD,OAAuB,WAAW,SAAsC;IAExE,OAAgB,WAAW;uBAtCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,MAAM;yBACJ,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,mCAAmC;yBAChD,OAAO,EAAE,CAAC,GAAG;yBACb,OAAO,EAAE,GAAG;yBACZ,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,CA8BjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,aAAa,EAAE,cAAc,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;KAC5F;CACF"}
|