@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,219 @@
|
|
|
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 radius: {
|
|
50
|
+
readonly type: "integer";
|
|
51
|
+
readonly title: "Radius";
|
|
52
|
+
readonly description: "Blur radius (1-10)";
|
|
53
|
+
readonly minimum: 1;
|
|
54
|
+
readonly maximum: 10;
|
|
55
|
+
readonly default: 1;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly required: readonly ["image"];
|
|
59
|
+
readonly additionalProperties: false;
|
|
60
|
+
};
|
|
61
|
+
declare const outputSchema: {
|
|
62
|
+
readonly type: "object";
|
|
63
|
+
readonly properties: {
|
|
64
|
+
readonly image: {
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly properties: {
|
|
67
|
+
readonly data: {
|
|
68
|
+
readonly type: "array";
|
|
69
|
+
readonly items: {
|
|
70
|
+
readonly type: "number";
|
|
71
|
+
readonly format: "Uint8Clamped";
|
|
72
|
+
};
|
|
73
|
+
readonly format: "Uint8ClampedArray";
|
|
74
|
+
readonly title: "Data";
|
|
75
|
+
readonly description: "Pixel data of the image";
|
|
76
|
+
};
|
|
77
|
+
readonly width: {
|
|
78
|
+
readonly type: "integer";
|
|
79
|
+
readonly minimum: 1;
|
|
80
|
+
readonly title: "Width";
|
|
81
|
+
readonly description: "Width in pixels";
|
|
82
|
+
};
|
|
83
|
+
readonly height: {
|
|
84
|
+
readonly type: "integer";
|
|
85
|
+
readonly minimum: 1;
|
|
86
|
+
readonly title: "Height";
|
|
87
|
+
readonly description: "Height in pixels";
|
|
88
|
+
};
|
|
89
|
+
readonly channels: {
|
|
90
|
+
readonly type: "integer";
|
|
91
|
+
readonly enum: readonly [1, 3, 4];
|
|
92
|
+
readonly title: "Channels";
|
|
93
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly additionalProperties: false;
|
|
97
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
98
|
+
readonly format: "image:ImageBinary";
|
|
99
|
+
readonly title: "Image";
|
|
100
|
+
readonly description: "Raw pixel image data";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly required: readonly ["image"];
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
};
|
|
106
|
+
export type ImageBlurTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
107
|
+
export type ImageBlurTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
108
|
+
export declare class ImageBlurTask<Input extends ImageBlurTaskInput = ImageBlurTaskInput, Output extends ImageBlurTaskOutput = ImageBlurTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
109
|
+
static readonly type = "ImageBlurTask";
|
|
110
|
+
static readonly category = "Image";
|
|
111
|
+
static title: string;
|
|
112
|
+
static description: string;
|
|
113
|
+
static inputSchema(): {
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly properties: {
|
|
116
|
+
readonly image: {
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly properties: {
|
|
119
|
+
readonly data: {
|
|
120
|
+
readonly type: "array";
|
|
121
|
+
readonly items: {
|
|
122
|
+
readonly type: "number";
|
|
123
|
+
readonly format: "Uint8Clamped";
|
|
124
|
+
};
|
|
125
|
+
readonly format: "Uint8ClampedArray";
|
|
126
|
+
readonly title: "Data";
|
|
127
|
+
readonly description: "Pixel data of the image";
|
|
128
|
+
};
|
|
129
|
+
readonly width: {
|
|
130
|
+
readonly type: "integer";
|
|
131
|
+
readonly minimum: 1;
|
|
132
|
+
readonly title: "Width";
|
|
133
|
+
readonly description: "Width in pixels";
|
|
134
|
+
};
|
|
135
|
+
readonly height: {
|
|
136
|
+
readonly type: "integer";
|
|
137
|
+
readonly minimum: 1;
|
|
138
|
+
readonly title: "Height";
|
|
139
|
+
readonly description: "Height in pixels";
|
|
140
|
+
};
|
|
141
|
+
readonly channels: {
|
|
142
|
+
readonly type: "integer";
|
|
143
|
+
readonly enum: readonly [1, 3, 4];
|
|
144
|
+
readonly title: "Channels";
|
|
145
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly additionalProperties: false;
|
|
149
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
150
|
+
readonly format: "image:ImageBinary";
|
|
151
|
+
readonly title: "Image";
|
|
152
|
+
readonly description: "Raw pixel image data";
|
|
153
|
+
};
|
|
154
|
+
readonly radius: {
|
|
155
|
+
readonly type: "integer";
|
|
156
|
+
readonly title: "Radius";
|
|
157
|
+
readonly description: "Blur radius (1-10)";
|
|
158
|
+
readonly minimum: 1;
|
|
159
|
+
readonly maximum: 10;
|
|
160
|
+
readonly default: 1;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly required: readonly ["image"];
|
|
164
|
+
readonly additionalProperties: false;
|
|
165
|
+
};
|
|
166
|
+
static outputSchema(): {
|
|
167
|
+
readonly type: "object";
|
|
168
|
+
readonly properties: {
|
|
169
|
+
readonly image: {
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly properties: {
|
|
172
|
+
readonly data: {
|
|
173
|
+
readonly type: "array";
|
|
174
|
+
readonly items: {
|
|
175
|
+
readonly type: "number";
|
|
176
|
+
readonly format: "Uint8Clamped";
|
|
177
|
+
};
|
|
178
|
+
readonly format: "Uint8ClampedArray";
|
|
179
|
+
readonly title: "Data";
|
|
180
|
+
readonly description: "Pixel data of the image";
|
|
181
|
+
};
|
|
182
|
+
readonly width: {
|
|
183
|
+
readonly type: "integer";
|
|
184
|
+
readonly minimum: 1;
|
|
185
|
+
readonly title: "Width";
|
|
186
|
+
readonly description: "Width in pixels";
|
|
187
|
+
};
|
|
188
|
+
readonly height: {
|
|
189
|
+
readonly type: "integer";
|
|
190
|
+
readonly minimum: 1;
|
|
191
|
+
readonly title: "Height";
|
|
192
|
+
readonly description: "Height in pixels";
|
|
193
|
+
};
|
|
194
|
+
readonly channels: {
|
|
195
|
+
readonly type: "integer";
|
|
196
|
+
readonly enum: readonly [1, 3, 4];
|
|
197
|
+
readonly title: "Channels";
|
|
198
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
readonly additionalProperties: false;
|
|
202
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
203
|
+
readonly format: "image:ImageBinary";
|
|
204
|
+
readonly title: "Image";
|
|
205
|
+
readonly description: "Raw pixel image data";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
readonly required: readonly ["image"];
|
|
209
|
+
readonly additionalProperties: false;
|
|
210
|
+
};
|
|
211
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
212
|
+
}
|
|
213
|
+
declare module "@workglow/task-graph" {
|
|
214
|
+
interface Workflow {
|
|
215
|
+
imageBlur: CreateWorkflow<ImageBlurTaskInput, ImageBlurTaskOutput, TaskConfig>;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export {};
|
|
219
|
+
//# sourceMappingURL=ImageBlurTask.d.ts.map
|
|
@@ -0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EAAE,SAAS;yBACf,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,oBAAoB;yBACjC,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,EAAE;yBACX,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,CAgDjB;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,281 @@
|
|
|
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 borderWidth: {
|
|
50
|
+
readonly type: "integer";
|
|
51
|
+
readonly title: "Border Width";
|
|
52
|
+
readonly description: "Border width in pixels";
|
|
53
|
+
readonly minimum: 1;
|
|
54
|
+
readonly default: 1;
|
|
55
|
+
};
|
|
56
|
+
readonly color: {
|
|
57
|
+
readonly type: "object";
|
|
58
|
+
readonly properties: {
|
|
59
|
+
readonly r: {
|
|
60
|
+
readonly type: "integer";
|
|
61
|
+
readonly minimum: 0;
|
|
62
|
+
readonly maximum: 255;
|
|
63
|
+
readonly title: "Red";
|
|
64
|
+
};
|
|
65
|
+
readonly g: {
|
|
66
|
+
readonly type: "integer";
|
|
67
|
+
readonly minimum: 0;
|
|
68
|
+
readonly maximum: 255;
|
|
69
|
+
readonly title: "Green";
|
|
70
|
+
};
|
|
71
|
+
readonly b: {
|
|
72
|
+
readonly type: "integer";
|
|
73
|
+
readonly minimum: 0;
|
|
74
|
+
readonly maximum: 255;
|
|
75
|
+
readonly title: "Blue";
|
|
76
|
+
};
|
|
77
|
+
readonly a: {
|
|
78
|
+
readonly type: "integer";
|
|
79
|
+
readonly minimum: 0;
|
|
80
|
+
readonly maximum: 255;
|
|
81
|
+
readonly title: "Alpha";
|
|
82
|
+
readonly default: 255;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly required: readonly ["r", "g", "b"];
|
|
86
|
+
readonly additionalProperties: false;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly required: readonly ["image", "color"];
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
};
|
|
92
|
+
declare const outputSchema: {
|
|
93
|
+
readonly type: "object";
|
|
94
|
+
readonly properties: {
|
|
95
|
+
readonly image: {
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly data: {
|
|
99
|
+
readonly type: "array";
|
|
100
|
+
readonly items: {
|
|
101
|
+
readonly type: "number";
|
|
102
|
+
readonly format: "Uint8Clamped";
|
|
103
|
+
};
|
|
104
|
+
readonly format: "Uint8ClampedArray";
|
|
105
|
+
readonly title: "Data";
|
|
106
|
+
readonly description: "Pixel data of the image";
|
|
107
|
+
};
|
|
108
|
+
readonly width: {
|
|
109
|
+
readonly type: "integer";
|
|
110
|
+
readonly minimum: 1;
|
|
111
|
+
readonly title: "Width";
|
|
112
|
+
readonly description: "Width in pixels";
|
|
113
|
+
};
|
|
114
|
+
readonly height: {
|
|
115
|
+
readonly type: "integer";
|
|
116
|
+
readonly minimum: 1;
|
|
117
|
+
readonly title: "Height";
|
|
118
|
+
readonly description: "Height in pixels";
|
|
119
|
+
};
|
|
120
|
+
readonly channels: {
|
|
121
|
+
readonly type: "integer";
|
|
122
|
+
readonly enum: readonly [1, 3, 4];
|
|
123
|
+
readonly title: "Channels";
|
|
124
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
readonly additionalProperties: false;
|
|
128
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
129
|
+
readonly format: "image:ImageBinary";
|
|
130
|
+
readonly title: "Image";
|
|
131
|
+
readonly description: "Raw pixel image data";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly required: readonly ["image"];
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
};
|
|
137
|
+
export type ImageBorderTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
138
|
+
export type ImageBorderTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
139
|
+
export declare class ImageBorderTask<Input extends ImageBorderTaskInput = ImageBorderTaskInput, Output extends ImageBorderTaskOutput = ImageBorderTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
140
|
+
static readonly type = "ImageBorderTask";
|
|
141
|
+
static readonly category = "Image";
|
|
142
|
+
static title: string;
|
|
143
|
+
static description: string;
|
|
144
|
+
static inputSchema(): {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly image: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly properties: {
|
|
150
|
+
readonly data: {
|
|
151
|
+
readonly type: "array";
|
|
152
|
+
readonly items: {
|
|
153
|
+
readonly type: "number";
|
|
154
|
+
readonly format: "Uint8Clamped";
|
|
155
|
+
};
|
|
156
|
+
readonly format: "Uint8ClampedArray";
|
|
157
|
+
readonly title: "Data";
|
|
158
|
+
readonly description: "Pixel data of the image";
|
|
159
|
+
};
|
|
160
|
+
readonly width: {
|
|
161
|
+
readonly type: "integer";
|
|
162
|
+
readonly minimum: 1;
|
|
163
|
+
readonly title: "Width";
|
|
164
|
+
readonly description: "Width in pixels";
|
|
165
|
+
};
|
|
166
|
+
readonly height: {
|
|
167
|
+
readonly type: "integer";
|
|
168
|
+
readonly minimum: 1;
|
|
169
|
+
readonly title: "Height";
|
|
170
|
+
readonly description: "Height in pixels";
|
|
171
|
+
};
|
|
172
|
+
readonly channels: {
|
|
173
|
+
readonly type: "integer";
|
|
174
|
+
readonly enum: readonly [1, 3, 4];
|
|
175
|
+
readonly title: "Channels";
|
|
176
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly additionalProperties: false;
|
|
180
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
181
|
+
readonly format: "image:ImageBinary";
|
|
182
|
+
readonly title: "Image";
|
|
183
|
+
readonly description: "Raw pixel image data";
|
|
184
|
+
};
|
|
185
|
+
readonly borderWidth: {
|
|
186
|
+
readonly type: "integer";
|
|
187
|
+
readonly title: "Border Width";
|
|
188
|
+
readonly description: "Border width in pixels";
|
|
189
|
+
readonly minimum: 1;
|
|
190
|
+
readonly default: 1;
|
|
191
|
+
};
|
|
192
|
+
readonly color: {
|
|
193
|
+
readonly type: "object";
|
|
194
|
+
readonly properties: {
|
|
195
|
+
readonly r: {
|
|
196
|
+
readonly type: "integer";
|
|
197
|
+
readonly minimum: 0;
|
|
198
|
+
readonly maximum: 255;
|
|
199
|
+
readonly title: "Red";
|
|
200
|
+
};
|
|
201
|
+
readonly g: {
|
|
202
|
+
readonly type: "integer";
|
|
203
|
+
readonly minimum: 0;
|
|
204
|
+
readonly maximum: 255;
|
|
205
|
+
readonly title: "Green";
|
|
206
|
+
};
|
|
207
|
+
readonly b: {
|
|
208
|
+
readonly type: "integer";
|
|
209
|
+
readonly minimum: 0;
|
|
210
|
+
readonly maximum: 255;
|
|
211
|
+
readonly title: "Blue";
|
|
212
|
+
};
|
|
213
|
+
readonly a: {
|
|
214
|
+
readonly type: "integer";
|
|
215
|
+
readonly minimum: 0;
|
|
216
|
+
readonly maximum: 255;
|
|
217
|
+
readonly title: "Alpha";
|
|
218
|
+
readonly default: 255;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
readonly required: readonly ["r", "g", "b"];
|
|
222
|
+
readonly additionalProperties: false;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly required: readonly ["image", "color"];
|
|
226
|
+
readonly additionalProperties: false;
|
|
227
|
+
};
|
|
228
|
+
static outputSchema(): {
|
|
229
|
+
readonly type: "object";
|
|
230
|
+
readonly properties: {
|
|
231
|
+
readonly image: {
|
|
232
|
+
readonly type: "object";
|
|
233
|
+
readonly properties: {
|
|
234
|
+
readonly data: {
|
|
235
|
+
readonly type: "array";
|
|
236
|
+
readonly items: {
|
|
237
|
+
readonly type: "number";
|
|
238
|
+
readonly format: "Uint8Clamped";
|
|
239
|
+
};
|
|
240
|
+
readonly format: "Uint8ClampedArray";
|
|
241
|
+
readonly title: "Data";
|
|
242
|
+
readonly description: "Pixel data of the image";
|
|
243
|
+
};
|
|
244
|
+
readonly width: {
|
|
245
|
+
readonly type: "integer";
|
|
246
|
+
readonly minimum: 1;
|
|
247
|
+
readonly title: "Width";
|
|
248
|
+
readonly description: "Width in pixels";
|
|
249
|
+
};
|
|
250
|
+
readonly height: {
|
|
251
|
+
readonly type: "integer";
|
|
252
|
+
readonly minimum: 1;
|
|
253
|
+
readonly title: "Height";
|
|
254
|
+
readonly description: "Height in pixels";
|
|
255
|
+
};
|
|
256
|
+
readonly channels: {
|
|
257
|
+
readonly type: "integer";
|
|
258
|
+
readonly enum: readonly [1, 3, 4];
|
|
259
|
+
readonly title: "Channels";
|
|
260
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly additionalProperties: false;
|
|
264
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
265
|
+
readonly format: "image:ImageBinary";
|
|
266
|
+
readonly title: "Image";
|
|
267
|
+
readonly description: "Raw pixel image data";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly required: readonly ["image"];
|
|
271
|
+
readonly additionalProperties: false;
|
|
272
|
+
};
|
|
273
|
+
executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
|
|
274
|
+
}
|
|
275
|
+
declare module "@workglow/task-graph" {
|
|
276
|
+
interface Workflow {
|
|
277
|
+
imageBorder: CreateWorkflow<ImageBorderTaskInput, ImageBorderTaskOutput, TaskConfig>;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
export {};
|
|
281
|
+
//# sourceMappingURL=ImageBorderTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageBorderTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageBorderTask.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,WAAW;qBACT,IAAI,EAAE,SAAS;qBACf,KAAK,EAAE,cAAc;qBACrB,WAAW,EAAE,wBAAwB;qBACrC,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,CAAC;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AACvE,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAEzE,qBAAa,eAAe,CAC1B,KAAK,SAAS,oBAAoB,GAAG,oBAAoB,EACzD,MAAM,SAAS,qBAAqB,GAAG,qBAAqB,EAC5D,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,qBAAqB;IAClD,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