@digipair/skill-sharp 0.98.0 → 0.98.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/schema.json CHANGED
@@ -66,958 +66,938 @@
66
66
  "description": "Whether the image has an alpha channel"
67
67
  }
68
68
  }
69
- "width": 1920,
70
- "height": 1080,
71
- "channels": 3,
72
- "format": "jpeg",
73
- "space": "srgb",
74
- "density": 72,
75
- "hasProfile": false,
76
- "hasAlpha": false
77
69
  }
78
70
  }
79
71
  }
80
72
  }
81
73
  }
82
74
  }
83
- }
84
- },
85
- "/stats": {
86
- "post": {
87
- "tags": [
88
- "service"
89
- ],
90
- "summary": "Stats",
91
- "description": "Returns image statistics like mean and standard deviation",
92
- "parameters": [
93
- {
94
- "name": "content",
95
- "required": true,
96
- "schema": {
97
- "type": "string"
75
+ },
76
+ "/stats": {
77
+ "post": {
78
+ "tags": [
79
+ "service"
80
+ ],
81
+ "summary": "Stats",
82
+ "description": "Returns image statistics like mean and standard deviation",
83
+ "parameters": [
84
+ {
85
+ "name": "content",
86
+ "required": true,
87
+ "schema": {
88
+ "type": "string"
89
+ }
98
90
  }
99
- }
100
- ],
101
- "responses": {
102
- "200": {
103
- "description": "Image statistics object",
104
- "content": {
105
- "application/json": {
106
- "schema": {
107
- "type": "object",
108
- "properties": {
109
- "channels": {
110
- "type": "array",
111
- "items": {
112
- "type": "object",
113
- "properties": {
114
- "min": {
115
- "type": "number",
116
- "description": "Minimum pixel value"
117
- },
118
- "max": {
119
- "type": "number",
120
- "description": "Maximum pixel value"
121
- },
122
- "sum": {
123
- "type": "number",
124
- "description": "Sum of all pixel values"
125
- },
126
- "squaresSum": {
127
- "type": "number",
128
- "description": "Sum of squared pixel values"
129
- },
130
- "mean": {
131
- "type": "number",
132
- "description": "Mean pixel value"
133
- },
134
- "stdev": {
135
- "type": "number",
136
- "description": "Standard deviation of pixel values"
91
+ ],
92
+ "responses": {
93
+ "200": {
94
+ "description": "Image statistics object",
95
+ "content": {
96
+ "application/json": {
97
+ "schema": {
98
+ "type": "object",
99
+ "properties": {
100
+ "channels": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "properties": {
105
+ "min": {
106
+ "type": "number",
107
+ "description": "Minimum pixel value"
108
+ },
109
+ "max": {
110
+ "type": "number",
111
+ "description": "Maximum pixel value"
112
+ },
113
+ "sum": {
114
+ "type": "number",
115
+ "description": "Sum of all pixel values"
116
+ },
117
+ "squaresSum": {
118
+ "type": "number",
119
+ "description": "Sum of squared pixel values"
120
+ },
121
+ "mean": {
122
+ "type": "number",
123
+ "description": "Mean pixel value"
124
+ },
125
+ "stdev": {
126
+ "type": "number",
127
+ "description": "Standard deviation of pixel values"
128
+ }
137
129
  }
138
130
  }
139
131
  }
140
132
  }
141
133
  }
142
- "channels": [
143
- {
144
- "min": 0,
145
- "max": 255,
146
- "sum": 12345678,
147
- "squaresSum": 987654321,
148
- "mean": 128.5,
149
- "stdev": 64.2
150
- }
151
- ]
152
134
  }
153
135
  }
154
136
  }
155
137
  }
156
138
  }
157
- }
158
- }
159
- },
160
- "/raw": {
161
- "post": {
162
- "tags": [
163
- "service"
164
- ],
165
- "summary": "Raw",
166
- "description": "Returns raw image buffer as base64",
167
- "parameters": [
168
- {
169
- "name": "content",
170
- "required": true,
171
- "schema": {
172
- "type": "string"
139
+ },
140
+ "/raw": {
141
+ "post": {
142
+ "tags": [
143
+ "service"
144
+ ],
145
+ "summary": "Raw",
146
+ "description": "Returns raw image buffer as base64",
147
+ "parameters": [
148
+ {
149
+ "name": "content",
150
+ "required": true,
151
+ "schema": {
152
+ "type": "string"
153
+ }
154
+ }
155
+ ],
156
+ "responses": {
157
+ "200": {
158
+ "description": "Raw image buffer as base64 string (without data URL prefix)",
159
+ "content": {
160
+ "application/json": {
161
+ "schema": {
162
+ "type": "string",
163
+ "description": "Base64-encoded raw image buffer"
164
+ }
165
+ }
166
+ }
167
+ }
173
168
  }
174
169
  }
175
- ],
176
- "responses": {
177
- "200": {
178
- "description": "Raw image buffer as base64 string (without data URL prefix)",
179
- "content": {
180
- "application/json": {
170
+ },
171
+ "/resize": {
172
+ "post": {
173
+ "tags": [
174
+ "service"
175
+ ],
176
+ "summary": "Resize",
177
+ "description": "Resizes the image",
178
+ "parameters": [
179
+ {
180
+ "name": "content",
181
+ "required": true,
181
182
  "schema": {
182
- "type": "string",
183
- "description": "Base64-encoded raw image buffer"
183
+ "type": "string"
184
+ }
185
+ },
186
+ {
187
+ "name": "width",
188
+ "required": true,
189
+ "schema": {
190
+ "type": "number"
191
+ }
192
+ },
193
+ {
194
+ "name": "height",
195
+ "required": true,
196
+ "schema": {
197
+ "type": "number"
198
+ }
199
+ },
200
+ {
201
+ "name": "options",
202
+ "required": false,
203
+ "schema": {
204
+ "type": "object"
205
+ }
206
+ }
207
+ ],
208
+ "responses": {
209
+ "200": {
210
+ "description": "Resized image as base64-encoded data URL",
211
+ "content": {
212
+ "application/json": {
213
+ "schema": {
214
+ "type": "string",
215
+ "description": "Base64-encoded image with data URL prefix"
216
+ }
217
+ }
184
218
  }
185
219
  }
186
220
  }
187
221
  }
188
- }
189
- }
190
- },
191
- "/resize": {
192
- "post": {
193
- "tags": [
194
- "service"
195
- ],
196
- "summary": "Resize",
197
- "description": "Resizes the image",
198
- "parameters": [
199
- {
200
- "name": "content",
201
- "required": true,
202
- "schema": {
203
- "type": "string"
204
- }
205
- },
206
- {
207
- "name": "width",
208
- "required": true,
209
- "schema": {
210
- "type": "number"
211
- }
212
- },
213
- {
214
- "name": "height",
215
- "required": true,
216
- "schema": {
217
- "type": "number"
222
+ },
223
+ "/rotate": {
224
+ "post": {
225
+ "tags": [
226
+ "service"
227
+ ],
228
+ "summary": "Rotate",
229
+ "description": "Rotates the image (angle optional)",
230
+ "parameters": [
231
+ {
232
+ "name": "content",
233
+ "required": true,
234
+ "schema": {
235
+ "type": "string"
236
+ }
237
+ },
238
+ {
239
+ "name": "angle",
240
+ "required": false,
241
+ "schema": {
242
+ "type": "number"
243
+ }
244
+ }
245
+ ],
246
+ "responses": {
247
+ "200": {
248
+ "description": "Rotated image as base64-encoded data URL",
249
+ "content": {
250
+ "application/json": {
251
+ "schema": {
252
+ "type": "string",
253
+ "description": "Base64-encoded image with data URL prefix"
254
+ }
255
+ }
256
+ }
257
+ }
218
258
  }
219
- },
220
- {
221
- "name": "options",
222
- "required": false,
223
- "schema": {
224
- "type": "object"
259
+ }
260
+ },
261
+ "/extract": {
262
+ "post": {
263
+ "tags": [
264
+ "service"
265
+ ],
266
+ "summary": "Extract",
267
+ "description": "Extracts a region from the image",
268
+ "parameters": [
269
+ {
270
+ "name": "content",
271
+ "required": true,
272
+ "schema": {
273
+ "type": "string"
274
+ }
275
+ },
276
+ {
277
+ "name": "left",
278
+ "required": true,
279
+ "schema": {
280
+ "type": "number"
281
+ }
282
+ },
283
+ {
284
+ "name": "top",
285
+ "required": true,
286
+ "schema": {
287
+ "type": "number"
288
+ }
289
+ },
290
+ {
291
+ "name": "width",
292
+ "required": true,
293
+ "schema": {
294
+ "type": "number"
295
+ }
296
+ },
297
+ {
298
+ "name": "height",
299
+ "required": true,
300
+ "schema": {
301
+ "type": "number"
302
+ }
303
+ }
304
+ ],
305
+ "responses": {
306
+ "200": {
307
+ "description": "Extracted image region as base64-encoded data URL",
308
+ "content": {
309
+ "application/json": {
310
+ "schema": {
311
+ "type": "string",
312
+ "description": "Base64-encoded image with data URL prefix"
313
+ }
314
+ }
315
+ }
316
+ }
225
317
  }
226
318
  }
227
- ],
228
- "responses": {
229
- "200": {
230
- "description": "Resized image as base64-encoded data URL",
231
- "content": {
232
- "application/json": {
319
+ },
320
+ "/flip": {
321
+ "post": {
322
+ "tags": [
323
+ "service"
324
+ ],
325
+ "summary": "Flip",
326
+ "description": "Flips the image vertically",
327
+ "parameters": [
328
+ {
329
+ "name": "content",
330
+ "required": true,
233
331
  "schema": {
234
- "type": "string",
235
- "description": "Base64-encoded image with data URL prefix"
332
+ "type": "string"
333
+ }
334
+ }
335
+ ],
336
+ "responses": {
337
+ "200": {
338
+ "description": "Vertically flipped image as base64-encoded data URL",
339
+ "content": {
340
+ "application/json": {
341
+ "schema": {
342
+ "type": "string",
343
+ "description": "Base64-encoded image with data URL prefix"
344
+ }
345
+ }
236
346
  }
237
347
  }
238
348
  }
239
349
  }
240
- }
241
- }
242
- },
243
- "/rotate": {
244
- "post": {
245
- "tags": [
246
- "service"
247
- ],
248
- "summary": "Rotate",
249
- "description": "Rotates the image (angle optional)",
250
- "parameters": [
251
- {
252
- "name": "content",
253
- "required": true,
254
- "schema": {
255
- "type": "string"
350
+ },
351
+ "/flop": {
352
+ "post": {
353
+ "tags": [
354
+ "service"
355
+ ],
356
+ "summary": "Flop",
357
+ "description": "Flips the image horizontally",
358
+ "parameters": [
359
+ {
360
+ "name": "content",
361
+ "required": true,
362
+ "schema": {
363
+ "type": "string"
364
+ }
365
+ }
366
+ ],
367
+ "responses": {
368
+ "200": {
369
+ "description": "Horizontally flipped image as base64-encoded data URL",
370
+ "content": {
371
+ "application/json": {
372
+ "schema": {
373
+ "type": "string",
374
+ "description": "Base64-encoded image with data URL prefix"
375
+ }
376
+ }
377
+ }
378
+ }
256
379
  }
257
- },
258
- {
259
- "name": "angle",
260
- "required": false,
261
- "schema": {
262
- "type": "number"
380
+ }
381
+ },
382
+ "/autoOrient": {
383
+ "post": {
384
+ "tags": [
385
+ "service"
386
+ ],
387
+ "summary": "Auto Orient",
388
+ "description": "Automatically orients the image based on EXIF data",
389
+ "parameters": [
390
+ {
391
+ "name": "content",
392
+ "required": true,
393
+ "schema": {
394
+ "type": "string"
395
+ }
396
+ }
397
+ ],
398
+ "responses": {
399
+ "200": {
400
+ "description": "Auto-oriented image as base64-encoded data URL",
401
+ "content": {
402
+ "application/json": {
403
+ "schema": {
404
+ "type": "string",
405
+ "description": "Base64-encoded image with data URL prefix"
406
+ }
407
+ }
408
+ }
409
+ }
263
410
  }
264
411
  }
265
- ],
266
- "responses": {
267
- "200": {
268
- "description": "Rotated image as base64-encoded data URL",
269
- "content": {
270
- "application/json": {
412
+ },
413
+ "/grayscale": {
414
+ "post": {
415
+ "tags": [
416
+ "service"
417
+ ],
418
+ "summary": "Grayscale",
419
+ "description": "Converts the image to grayscale",
420
+ "parameters": [
421
+ {
422
+ "name": "content",
423
+ "required": true,
271
424
  "schema": {
272
- "type": "string",
273
- "description": "Base64-encoded image with data URL prefix"
425
+ "type": "string"
426
+ }
427
+ }
428
+ ],
429
+ "responses": {
430
+ "200": {
431
+ "description": "Grayscale image as base64-encoded data URL",
432
+ "content": {
433
+ "application/json": {
434
+ "schema": {
435
+ "type": "string",
436
+ "description": "Base64-encoded image with data URL prefix"
437
+ }
438
+ }
274
439
  }
275
440
  }
276
441
  }
277
442
  }
278
- }
279
- }
280
- },
281
- "/extract": {
282
- "post": {
283
- "tags": [
284
- "service"
285
- ],
286
- "summary": "Extract",
287
- "description": "Extracts a region from the image",
288
- "parameters": [
289
- {
290
- "name": "content",
291
- "required": true,
292
- "schema": {
293
- "type": "string"
443
+ },
444
+ "/linear": {
445
+ "post": {
446
+ "tags": [
447
+ "service"
448
+ ],
449
+ "summary": "Linear",
450
+ "description": "Applies a linear transformation to the image",
451
+ "parameters": [
452
+ {
453
+ "name": "content",
454
+ "required": true,
455
+ "schema": {
456
+ "type": "string"
457
+ }
458
+ },
459
+ {
460
+ "name": "multiplier",
461
+ "required": true,
462
+ "schema": {
463
+ "type": "number"
464
+ }
465
+ },
466
+ {
467
+ "name": "offset",
468
+ "required": true,
469
+ "schema": {
470
+ "type": "number"
471
+ }
472
+ }
473
+ ],
474
+ "responses": {
475
+ "200": {
476
+ "description": "Linear transformed image as base64-encoded data URL",
477
+ "content": {
478
+ "application/json": {
479
+ "schema": {
480
+ "type": "string",
481
+ "description": "Base64-encoded image with data URL prefix"
482
+ }
483
+ }
484
+ }
485
+ }
294
486
  }
295
- },
296
- {
297
- "name": "left",
298
- "required": true,
299
- "schema": {
300
- "type": "number"
487
+ }
488
+ },
489
+ "/threshold": {
490
+ "post": {
491
+ "tags": [
492
+ "service"
493
+ ],
494
+ "summary": "Threshold",
495
+ "description": "Applies a threshold to the image to convert it to black and white.",
496
+ "parameters": [
497
+ {
498
+ "name": "content",
499
+ "required": true,
500
+ "schema": {
501
+ "type": "string"
502
+ }
503
+ },
504
+ {
505
+ "name": "level",
506
+ "required": false,
507
+ "schema": {
508
+ "type": "number",
509
+ "default": 128
510
+ }
511
+ },
512
+ {
513
+ "name": "option",
514
+ "required": false,
515
+ "schema": {
516
+ "type": "object"
517
+ }
518
+ }
519
+ ],
520
+ "responses": {
521
+ "200": {
522
+ "description": "Thresholded black and white image as base64-encoded data URL",
523
+ "content": {
524
+ "application/json": {
525
+ "schema": {
526
+ "type": "string",
527
+ "description": "Base64-encoded image with data URL prefix"
528
+ }
529
+ }
530
+ }
531
+ }
301
532
  }
302
- },
303
- {
304
- "name": "top",
305
- "required": true,
306
- "schema": {
307
- "type": "number"
533
+ }
534
+ },
535
+ "/negate": {
536
+ "post": {
537
+ "tags": [
538
+ "service"
539
+ ],
540
+ "summary": "Negate",
541
+ "description": "Inverts the image colors",
542
+ "parameters": [
543
+ {
544
+ "name": "content",
545
+ "required": true,
546
+ "schema": {
547
+ "type": "string"
548
+ }
549
+ }
550
+ ],
551
+ "responses": {
552
+ "200": {
553
+ "description": "Color-inverted image as base64-encoded data URL",
554
+ "content": {
555
+ "application/json": {
556
+ "schema": {
557
+ "type": "string",
558
+ "description": "Base64-encoded image with data URL prefix"
559
+ }
560
+ }
561
+ }
562
+ }
308
563
  }
309
- },
310
- {
311
- "name": "width",
312
- "required": true,
313
- "schema": {
314
- "type": "number"
564
+ }
565
+ },
566
+ "/tint": {
567
+ "post": {
568
+ "tags": [
569
+ "service"
570
+ ],
571
+ "summary": "Tint",
572
+ "description": "Applies a color tint",
573
+ "parameters": [
574
+ {
575
+ "name": "content",
576
+ "required": true,
577
+ "schema": {
578
+ "type": "string"
579
+ }
580
+ },
581
+ {
582
+ "name": "r",
583
+ "required": true,
584
+ "schema": {
585
+ "type": "number"
586
+ }
587
+ },
588
+ {
589
+ "name": "g",
590
+ "required": true,
591
+ "schema": {
592
+ "type": "number"
593
+ }
594
+ },
595
+ {
596
+ "name": "b",
597
+ "required": true,
598
+ "schema": {
599
+ "type": "number"
600
+ }
601
+ }
602
+ ],
603
+ "responses": {
604
+ "200": {
605
+ "description": "Color-tinted image as base64-encoded data URL",
606
+ "content": {
607
+ "application/json": {
608
+ "schema": {
609
+ "type": "string",
610
+ "description": "Base64-encoded image with data URL prefix"
611
+ }
612
+ }
613
+ }
614
+ }
315
615
  }
316
- },
317
- {
318
- "name": "height",
319
- "required": true,
320
- "schema": {
321
- "type": "number"
616
+ }
617
+ },
618
+ "/modulate": {
619
+ "post": {
620
+ "tags": [
621
+ "service"
622
+ ],
623
+ "summary": "Modulate",
624
+ "description": "Adjusts brightness, saturation and hue",
625
+ "parameters": [
626
+ {
627
+ "name": "content",
628
+ "required": true,
629
+ "schema": {
630
+ "type": "string"
631
+ }
632
+ },
633
+ {
634
+ "name": "brightness",
635
+ "required": false,
636
+ "schema": {
637
+ "type": "number"
638
+ }
639
+ },
640
+ {
641
+ "name": "saturation",
642
+ "required": false,
643
+ "schema": {
644
+ "type": "number"
645
+ }
646
+ },
647
+ {
648
+ "name": "hue",
649
+ "required": false,
650
+ "schema": {
651
+ "type": "number"
652
+ }
653
+ }
654
+ ],
655
+ "responses": {
656
+ "200": {
657
+ "description": "Modulated image with adjusted brightness/saturation/hue as base64-encoded data URL",
658
+ "content": {
659
+ "application/json": {
660
+ "schema": {
661
+ "type": "string",
662
+ "description": "Base64-encoded image with data URL prefix"
663
+ }
664
+ }
665
+ }
666
+ }
322
667
  }
323
668
  }
324
- ],
325
- "responses": {
326
- "200": {
327
- "description": "Extracted image region as base64-encoded data URL",
328
- "content": {
329
- "application/json": {
669
+ },
670
+ "/blur": {
671
+ "post": {
672
+ "tags": [
673
+ "service"
674
+ ],
675
+ "summary": "Blur",
676
+ "description": "Applies a blur effect",
677
+ "parameters": [
678
+ {
679
+ "name": "content",
680
+ "required": true,
330
681
  "schema": {
331
- "type": "string",
332
- "description": "Base64-encoded image with data URL prefix"
682
+ "type": "string"
683
+ }
684
+ },
685
+ {
686
+ "name": "radius",
687
+ "required": false,
688
+ "schema": {
689
+ "type": "number"
690
+ }
691
+ }
692
+ ],
693
+ "responses": {
694
+ "200": {
695
+ "description": "Blurred image as base64-encoded data URL",
696
+ "content": {
697
+ "application/json": {
698
+ "schema": {
699
+ "type": "string",
700
+ "description": "Base64-encoded image with data URL prefix"
701
+ }
702
+ }
333
703
  }
334
704
  }
335
705
  }
336
706
  }
337
- }
338
- }
339
- },
340
- "/flip": {
341
- "post": {
342
- "tags": [
343
- "service"
344
- ],
345
- "summary": "Flip",
346
- "description": "Flips the image vertically",
347
- "parameters": [
348
- {
349
- "name": "content",
350
- "required": true,
351
- "schema": {
352
- "type": "string"
353
- }
354
- }
355
- ],
356
- "responses": {
357
- "200": {
358
- "description": "Vertically flipped image as base64-encoded data URL",
359
- "content": {
360
- "application/json": {
707
+ },
708
+ "/sharpen": {
709
+ "post": {
710
+ "tags": [
711
+ "service"
712
+ ],
713
+ "summary": "Sharpen",
714
+ "description": "Sharpens the image",
715
+ "parameters": [
716
+ {
717
+ "name": "content",
718
+ "required": true,
361
719
  "schema": {
362
- "type": "string",
363
- "description": "Base64-encoded image with data URL prefix"
720
+ "type": "string"
364
721
  }
365
722
  }
366
- }
367
- }
368
- }
369
- }
370
- },
371
- "/flop": {
372
- "post": {
373
- "tags": [
374
- "service"
375
- ],
376
- "summary": "Flop",
377
- "description": "Flips the image horizontally",
378
- "parameters": [
379
- {
380
- "name": "content",
381
- "required": true,
382
- "schema": {
383
- "type": "string"
384
- }
385
- }
386
- ],
387
- "responses": {
388
- "200": {
389
- "description": "Horizontally flipped image as base64-encoded data URL",
390
- "content": {
391
- "application/json": {
392
- "schema": {
393
- "type": "string",
394
- "description": "Base64-encoded image with data URL prefix"
723
+ ],
724
+ "responses": {
725
+ "200": {
726
+ "description": "Sharpened image as base64-encoded data URL",
727
+ "content": {
728
+ "application/json": {
729
+ "schema": {
730
+ "type": "string",
731
+ "description": "Base64-encoded image with data URL prefix"
732
+ }
733
+ }
395
734
  }
396
735
  }
397
736
  }
398
737
  }
399
- }
400
- }
401
- },
402
- "/autoOrient": {
403
- "post": {
404
- "tags": [
405
- "service"
406
- ],
407
- "summary": "Auto Orient",
408
- "description": "Automatically orients the image based on EXIF data",
409
- "parameters": [
410
- {
411
- "name": "content",
412
- "required": true,
413
- "schema": {
414
- "type": "string"
415
- }
416
- }
417
- ],
418
- "responses": {
419
- "200": {
420
- "description": "Auto-oriented image as base64-encoded data URL",
421
- "content": {
422
- "application/json": {
738
+ },
739
+ "/toFormat": {
740
+ "post": {
741
+ "tags": [
742
+ "service"
743
+ ],
744
+ "summary": "To Format",
745
+ "description": "Converts the image to a different format",
746
+ "parameters": [
747
+ {
748
+ "name": "content",
749
+ "required": true,
423
750
  "schema": {
424
- "type": "string",
425
- "description": "Base64-encoded image with data URL prefix"
751
+ "type": "string"
426
752
  }
427
- }
428
- }
429
- }
430
- }
431
- }
432
- },
433
- "/grayscale": {
434
- "post": {
435
- "tags": [
436
- "service"
437
- ],
438
- "summary": "Grayscale",
439
- "description": "Converts the image to grayscale",
440
- "parameters": [
441
- {
442
- "name": "content",
443
- "required": true,
444
- "schema": {
445
- "type": "string"
446
- }
447
- }
448
- ],
449
- "responses": {
450
- "200": {
451
- "description": "Grayscale image as base64-encoded data URL",
452
- "content": {
453
- "application/json": {
753
+ },
754
+ {
755
+ "name": "format",
756
+ "required": true,
757
+ "description": "jpeg, png, webp, avif",
454
758
  "schema": {
455
759
  "type": "string",
456
- "description": "Base64-encoded image with data URL prefix"
760
+ "enum": [
761
+ "jpeg",
762
+ "png",
763
+ "webp",
764
+ "avif"
765
+ ]
457
766
  }
458
767
  }
459
- }
460
- }
461
- }
462
- }
463
- },
464
- "/linear": {
465
- "post": {
466
- "tags": [
467
- "service"
468
- ],
469
- "summary": "Linear",
470
- "description": "Applies a linear transformation to the image",
471
- "parameters": [
472
- {
473
- "name": "content",
474
- "required": true,
475
- "schema": {
476
- "type": "string"
477
- }
478
- },
479
- {
480
- "name": "multiplier",
481
- "required": true,
482
- "schema": {
483
- "type": "number"
484
- }
485
- },
486
- {
487
- "name": "offset",
488
- "required": true,
489
- "schema": {
490
- "type": "number"
491
- }
492
- }
493
- ],
494
- "responses": {
495
- "200": {
496
- "description": "Linear transformed image as base64-encoded data URL",
497
- "content": {
498
- "application/json": {
499
- "schema": {
500
- "type": "string",
501
- "description": "Base64-encoded image with data URL prefix"
768
+ ],
769
+ "responses": {
770
+ "200": {
771
+ "description": "Format-converted image as base64-encoded data URL",
772
+ "content": {
773
+ "application/json": {
774
+ "schema": {
775
+ "type": "string",
776
+ "description": "Base64-encoded image with data URL prefix in the specified format"
777
+ }
778
+ }
502
779
  }
503
780
  }
504
781
  }
505
782
  }
506
- }
507
- }
508
- },
509
- "/threshold": {
510
- "post": {
511
- "tags": [
512
- "service"
513
- ],
514
- "summary": "Threshold",
515
- "description": "Applies a threshold to the image to convert it to black and white.",
516
- "parameters": [
517
- {
518
- "name": "content",
519
- "required": true,
520
- "schema": {
521
- "type": "string"
522
- }
523
- },
524
- {
525
- "name": "level",
526
- "required": false,
527
- "schema": {
528
- "type": "number",
529
- "default": 128
530
- }
531
- },
532
- {
533
- "name": "option",
534
- "required": false,
535
- "schema": {
536
- "type": "object"
537
- }
538
- }
539
- ],
540
- "responses": {
541
- "200": {
542
- "description": "Thresholded black and white image as base64-encoded data URL",
543
- "content": {
544
- "application/json": {
783
+ },
784
+ "/jpeg": {
785
+ "post": {
786
+ "tags": [
787
+ "service"
788
+ ],
789
+ "summary": "JPEG",
790
+ "description": "Exports the image as JPEG",
791
+ "parameters": [
792
+ {
793
+ "name": "content",
794
+ "required": true,
545
795
  "schema": {
546
- "type": "string",
547
- "description": "Base64-encoded image with data URL prefix"
796
+ "type": "string"
548
797
  }
549
- }
550
- }
551
- }
552
- }
553
- }
554
- },
555
- "/negate": {
556
- "post": {
557
- "tags": [
558
- "service"
559
- ],
560
- "summary": "Negate",
561
- "description": "Inverts the image colors",
562
- "parameters": [
563
- {
564
- "name": "content",
565
- "required": true,
566
- "schema": {
567
- "type": "string"
568
- }
569
- }
570
- ],
571
- "responses": {
572
- "200": {
573
- "description": "Color-inverted image as base64-encoded data URL",
574
- "content": {
575
- "application/json": {
798
+ },
799
+ {
800
+ "name": "quality",
801
+ "required": false,
576
802
  "schema": {
577
- "type": "string",
578
- "description": "Base64-encoded image with data URL prefix"
803
+ "type": "number",
804
+ "default": 80
579
805
  }
580
806
  }
581
- }
582
- }
583
- }
584
- }
585
- },
586
- "/tint": {
587
- "post": {
588
- "tags": [
589
- "service"
590
- ],
591
- "summary": "Tint",
592
- "description": "Applies a color tint",
593
- "parameters": [
594
- {
595
- "name": "content",
596
- "required": true,
597
- "schema": {
598
- "type": "string"
599
- }
600
- },
601
- {
602
- "name": "r",
603
- "required": true,
604
- "schema": {
605
- "type": "number"
606
- }
607
- },
608
- {
609
- "name": "g",
610
- "required": true,
611
- "schema": {
612
- "type": "number"
613
- }
614
- },
615
- {
616
- "name": "b",
617
- "required": true,
618
- "schema": {
619
- "type": "number"
620
- }
621
- }
622
- ],
623
- "responses": {
624
- "200": {
625
- "description": "Color-tinted image as base64-encoded data URL",
626
- "content": {
627
- "application/json": {
628
- "schema": {
629
- "type": "string",
630
- "description": "Base64-encoded image with data URL prefix"
807
+ ],
808
+ "responses": {
809
+ "200": {
810
+ "description": "JPEG-encoded image as base64-encoded data URL",
811
+ "content": {
812
+ "application/json": {
813
+ "schema": {
814
+ "type": "string",
815
+ "description": "Base64-encoded JPEG image with data URL prefix"
816
+ }
817
+ }
631
818
  }
632
819
  }
633
820
  }
634
821
  }
635
- }
636
- }
637
- },
638
- "/modulate": {
639
- "post": {
640
- "tags": [
641
- "service"
642
- ],
643
- "summary": "Modulate",
644
- "description": "Adjusts brightness, saturation and hue",
645
- "parameters": [
646
- {
647
- "name": "content",
648
- "required": true,
649
- "schema": {
650
- "type": "string"
651
- }
652
- },
653
- {
654
- "name": "brightness",
655
- "required": false,
656
- "schema": {
657
- "type": "number"
658
- }
659
- },
660
- {
661
- "name": "saturation",
662
- "required": false,
663
- "schema": {
664
- "type": "number"
665
- }
666
- },
667
- {
668
- "name": "hue",
669
- "required": false,
670
- "schema": {
671
- "type": "number"
672
- }
673
- }
674
- ],
675
- "responses": {
676
- "200": {
677
- "description": "Modulated image with adjusted brightness/saturation/hue as base64-encoded data URL",
678
- "content": {
679
- "application/json": {
822
+ },
823
+ "/png": {
824
+ "post": {
825
+ "tags": [
826
+ "service"
827
+ ],
828
+ "summary": "PNG",
829
+ "description": "Exports the image as PNG",
830
+ "parameters": [
831
+ {
832
+ "name": "content",
833
+ "required": true,
680
834
  "schema": {
681
- "type": "string",
682
- "description": "Base64-encoded image with data URL prefix"
835
+ "type": "string"
683
836
  }
684
- }
685
- }
686
- }
687
- }
688
- }
689
- },
690
- "/blur": {
691
- "post": {
692
- "tags": [
693
- "service"
694
- ],
695
- "summary": "Blur",
696
- "description": "Applies a blur effect",
697
- "parameters": [
698
- {
699
- "name": "content",
700
- "required": true,
701
- "schema": {
702
- "type": "string"
703
- }
704
- },
705
- {
706
- "name": "radius",
707
- "required": false,
708
- "schema": {
709
- "type": "number"
710
- }
711
- }
712
- ],
713
- "responses": {
714
- "200": {
715
- "description": "Blurred image as base64-encoded data URL",
716
- "content": {
717
- "application/json": {
837
+ },
838
+ {
839
+ "name": "compressionLevel",
840
+ "required": false,
718
841
  "schema": {
719
- "type": "string",
720
- "description": "Base64-encoded image with data URL prefix"
842
+ "type": "number",
843
+ "default": 6
721
844
  }
722
845
  }
723
- }
724
- }
725
- }
726
- }
727
- },
728
- "/sharpen": {
729
- "post": {
730
- "tags": [
731
- "service"
732
- ],
733
- "summary": "Sharpen",
734
- "description": "Sharpens the image",
735
- "parameters": [
736
- {
737
- "name": "content",
738
- "required": true,
739
- "schema": {
740
- "type": "string"
741
- }
742
- }
743
- ],
744
- "responses": {
745
- "200": {
746
- "description": "Sharpened image as base64-encoded data URL",
747
- "content": {
748
- "application/json": {
749
- "schema": {
750
- "type": "string",
751
- "description": "Base64-encoded image with data URL prefix"
846
+ ],
847
+ "responses": {
848
+ "200": {
849
+ "description": "PNG-encoded image as base64-encoded data URL",
850
+ "content": {
851
+ "application/json": {
852
+ "schema": {
853
+ "type": "string",
854
+ "description": "Base64-encoded PNG image with data URL prefix"
855
+ }
856
+ }
752
857
  }
753
858
  }
754
859
  }
755
860
  }
756
- }
757
- }
758
- },
759
- "/toFormat": {
760
- "post": {
761
- "tags": [
762
- "service"
763
- ],
764
- "summary": "To Format",
765
- "description": "Converts the image to a different format",
766
- "parameters": [
767
- {
768
- "name": "content",
769
- "required": true,
770
- "schema": {
771
- "type": "string"
772
- }
773
- },
774
- {
775
- "name": "format",
776
- "required": true,
777
- "description": "jpeg, png, webp, avif",
778
- "schema": {
779
- "type": "string",
780
- "enum": [
781
- "jpeg",
782
- "png",
783
- "webp",
784
- "avif"
785
- ]
786
- }
787
- }
788
- ],
789
- "responses": {
790
- "200": {
791
- "description": "Format-converted image as base64-encoded data URL",
792
- "content": {
793
- "application/json": {
861
+ },
862
+ "/webp": {
863
+ "post": {
864
+ "tags": [
865
+ "service"
866
+ ],
867
+ "summary": "WebP",
868
+ "description": "Exports the image as WebP",
869
+ "parameters": [
870
+ {
871
+ "name": "content",
872
+ "required": true,
794
873
  "schema": {
795
- "type": "string",
796
- "description": "Base64-encoded image with data URL prefix in the specified format"
874
+ "type": "string"
797
875
  }
798
- }
799
- }
800
- }
801
- }
802
- }
803
- },
804
- "/jpeg": {
805
- "post": {
806
- "tags": [
807
- "service"
808
- ],
809
- "summary": "JPEG",
810
- "description": "Exports the image as JPEG",
811
- "parameters": [
812
- {
813
- "name": "content",
814
- "required": true,
815
- "schema": {
816
- "type": "string"
817
- }
818
- },
819
- {
820
- "name": "quality",
821
- "required": false,
822
- "schema": {
823
- "type": "number",
824
- "default": 80
825
- }
826
- }
827
- ],
828
- "responses": {
829
- "200": {
830
- "description": "JPEG-encoded image as base64-encoded data URL",
831
- "content": {
832
- "application/json": {
876
+ },
877
+ {
878
+ "name": "quality",
879
+ "required": false,
833
880
  "schema": {
834
- "type": "string",
835
- "description": "Base64-encoded JPEG image with data URL prefix"
881
+ "type": "number",
882
+ "default": 80
836
883
  }
837
884
  }
838
- }
839
- }
840
- }
841
- }
842
- },
843
- "/png": {
844
- "post": {
845
- "tags": [
846
- "service"
847
- ],
848
- "summary": "PNG",
849
- "description": "Exports the image as PNG",
850
- "parameters": [
851
- {
852
- "name": "content",
853
- "required": true,
854
- "schema": {
855
- "type": "string"
856
- }
857
- },
858
- {
859
- "name": "compressionLevel",
860
- "required": false,
861
- "schema": {
862
- "type": "number",
863
- "default": 6
864
- }
865
- }
866
- ],
867
- "responses": {
868
- "200": {
869
- "description": "PNG-encoded image as base64-encoded data URL",
870
- "content": {
871
- "application/json": {
872
- "schema": {
873
- "type": "string",
874
- "description": "Base64-encoded PNG image with data URL prefix"
885
+ ],
886
+ "responses": {
887
+ "200": {
888
+ "description": "WebP-encoded image as base64-encoded data URL",
889
+ "content": {
890
+ "application/json": {
891
+ "schema": {
892
+ "type": "string",
893
+ "description": "Base64-encoded WebP image with data URL prefix"
894
+ }
895
+ }
875
896
  }
876
897
  }
877
898
  }
878
899
  }
879
- }
880
- }
881
- },
882
- "/webp": {
883
- "post": {
884
- "tags": [
885
- "service"
886
- ],
887
- "summary": "WebP",
888
- "description": "Exports the image as WebP",
889
- "parameters": [
890
- {
891
- "name": "content",
892
- "required": true,
893
- "schema": {
894
- "type": "string"
895
- }
896
- },
897
- {
898
- "name": "quality",
899
- "required": false,
900
- "schema": {
901
- "type": "number",
902
- "default": 80
903
- }
904
- }
905
- ],
906
- "responses": {
907
- "200": {
908
- "description": "WebP-encoded image as base64-encoded data URL",
909
- "content": {
910
- "application/json": {
900
+ },
901
+ "/avif": {
902
+ "post": {
903
+ "tags": [
904
+ "service"
905
+ ],
906
+ "summary": "AVIF",
907
+ "description": "Exports the image as AVIF",
908
+ "parameters": [
909
+ {
910
+ "name": "content",
911
+ "required": true,
911
912
  "schema": {
912
- "type": "string",
913
- "description": "Base64-encoded WebP image with data URL prefix"
913
+ "type": "string"
914
914
  }
915
- }
916
- }
917
- }
918
- }
919
- }
920
- },
921
- "/avif": {
922
- "post": {
923
- "tags": [
924
- "service"
925
- ],
926
- "summary": "AVIF",
927
- "description": "Exports the image as AVIF",
928
- "parameters": [
929
- {
930
- "name": "content",
931
- "required": true,
932
- "schema": {
933
- "type": "string"
934
- }
935
- },
936
- {
937
- "name": "quality",
938
- "required": false,
939
- "schema": {
940
- "type": "number",
941
- "default": 50
942
- }
943
- }
944
- ],
945
- "responses": {
946
- "200": {
947
- "description": "AVIF-encoded image as base64-encoded data URL",
948
- "content": {
949
- "application/json": {
915
+ },
916
+ {
917
+ "name": "quality",
918
+ "required": false,
950
919
  "schema": {
951
- "type": "string",
952
- "description": "Base64-encoded AVIF image with data URL prefix"
920
+ "type": "number",
921
+ "default": 50
953
922
  }
954
923
  }
955
- }
956
- }
957
- }
958
- }
959
- },
960
- "/composite": {
961
- "post": {
962
- "tags": [
963
- "service"
964
- ],
965
- "summary": "Composite",
966
- "description": "Overlays other images (e.g. watermark)",
967
- "parameters": [
968
- {
969
- "name": "content",
970
- "required": true,
971
- "schema": {
972
- "type": "string"
973
- }
974
- },
975
- {
976
- "name": "overlays",
977
- "required": true,
978
- "description": "Array of { input (base64), top, left }",
979
- "schema": {
980
- "type": "array",
981
- "items": {
982
- "type": "object",
983
- "properties": {
984
- "input": {
985
- "type": "string"
986
- },
987
- "top": {
988
- "type": "number"
989
- },
990
- "left": {
991
- "type": "number"
924
+ ],
925
+ "responses": {
926
+ "200": {
927
+ "description": "AVIF-encoded image as base64-encoded data URL",
928
+ "content": {
929
+ "application/json": {
930
+ "schema": {
931
+ "type": "string",
932
+ "description": "Base64-encoded AVIF image with data URL prefix"
933
+ }
992
934
  }
993
- },
994
- "required": [
995
- "input",
996
- "top",
997
- "left"
998
- ]
935
+ }
999
936
  }
1000
937
  }
1001
938
  }
1002
- ],
1003
- "responses": {
1004
- "200": {
1005
- "description": "Composite image with overlays as base64-encoded data URL",
1006
- "content": {
1007
- "application/json": {
939
+ },
940
+ "/composite": {
941
+ "post": {
942
+ "tags": [
943
+ "service"
944
+ ],
945
+ "summary": "Composite",
946
+ "description": "Overlays other images (e.g. watermark)",
947
+ "parameters": [
948
+ {
949
+ "name": "content",
950
+ "required": true,
1008
951
  "schema": {
1009
- "type": "string",
1010
- "description": "Base64-encoded image with overlays applied and data URL prefix"
952
+ "type": "string"
953
+ }
954
+ },
955
+ {
956
+ "name": "overlays",
957
+ "required": true,
958
+ "description": "Array of { input (base64), top, left }",
959
+ "schema": {
960
+ "type": "array",
961
+ "items": {
962
+ "type": "object",
963
+ "properties": {
964
+ "input": {
965
+ "type": "string"
966
+ },
967
+ "top": {
968
+ "type": "number"
969
+ },
970
+ "left": {
971
+ "type": "number"
972
+ }
973
+ },
974
+ "required": [
975
+ "input",
976
+ "top",
977
+ "left"
978
+ ]
979
+ }
980
+ }
981
+ }
982
+ ],
983
+ "responses": {
984
+ "200": {
985
+ "description": "Composite image with overlays as base64-encoded data URL",
986
+ "content": {
987
+ "application/json": {
988
+ "schema": {
989
+ "type": "string",
990
+ "description": "Base64-encoded image with overlays applied and data URL prefix"
991
+ }
992
+ }
1011
993
  }
1012
994
  }
1013
995
  }
1014
996
  }
1015
997
  }
1016
- }
1017
- }
1018
- },
1019
- "components": {
1020
- "schemas": {}
1021
- },
1022
- "x-scene-blocks": {}
998
+ },
999
+ "components": {
1000
+ "schemas": {}
1001
+ },
1002
+ "x-scene-blocks": {}
1023
1003
  }