Skip to content

Commit f673e9b

Browse files
feat(api): add no-enlarge crop modes and colorize transformation
- Add `maintain_ratio_no_enlarge` to `crop` enum - Add `pad_resize_no_enlarge` and `pad_extract_no_shrink` to `cropMode` enum - Add `colorize` transformation parameter for applying color tints
1 parent 11cd13e commit f673e9b

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-362d0336e8f52ab1beb7d9602a3665dbb0277700e8dc01ef4f96fc7651699349.yml
3-
openapi_spec_hash: f0d797a17b1e8e81707517700cd44b13
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-ad6dd3b4acf289708568a12574b997503059a47c4a4ca5ffefe64f40f3d3dbf3.yml
3+
openapi_spec_hash: 7c103e2dff0edcbeea82057e62f58d4d
44
config_hash: 94f48fd13b7d41b8b6a203a3a8cee9ed

src/resources/shared.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,17 @@ export interface Transformation {
14371437
*/
14381438
border?: string;
14391439

1440+
/**
1441+
* Applies a color tint to the image. Accepts color and intensity as optional
1442+
* parameters.
1443+
*
1444+
* - `co-color` - Color to apply (e.g., `red`, `blue`, `FF0022`). Default is gray
1445+
* color.
1446+
* - `in-intensity` - Intensity of the color (0-100). Default is 35. See
1447+
* [Colorize](https://imagekit.io/docs/effects-and-enhancements#colorize---e-colorize).
1448+
*/
1449+
colorize?: string;
1450+
14401451
/**
14411452
* Indicates whether the output image should retain the original color profile. See
14421453
* [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
@@ -1465,13 +1476,13 @@ export interface Transformation {
14651476
* Crop modes for image resizing. See
14661477
* [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
14671478
*/
1468-
crop?: 'force' | 'at_max' | 'at_max_enlarge' | 'at_least' | 'maintain_ratio';
1479+
crop?: 'force' | 'at_max' | 'at_max_enlarge' | 'at_least' | 'maintain_ratio' | 'maintain_ratio_no_enlarge';
14691480

14701481
/**
14711482
* Additional crop modes for image resizing. See
14721483
* [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
14731484
*/
1474-
cropMode?: 'pad_resize' | 'extract' | 'pad_extract';
1485+
cropMode?: 'pad_resize' | 'extract' | 'pad_extract' | 'pad_resize_no_enlarge' | 'pad_extract_no_shrink';
14751486

14761487
/**
14771488
* Specifies a fallback image if the resource is not found, e.g., a URL or file

0 commit comments

Comments
 (0)