imagekitio 4.4.1 → 4.6.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/README.md +1 -1
- data/lib/imagekitio/client.rb +17 -3
- data/lib/imagekitio/helpers/transformation_utils.rb +1 -0
- data/lib/imagekitio/internal/transport/base_client.rb +2 -0
- data/lib/imagekitio/models/metadata.rb +143 -17
- data/lib/imagekitio/models/transformation.rb +18 -1
- data/lib/imagekitio/version.rb +1 -1
- data/rbi/imagekitio/client.rbi +2 -2
- data/rbi/imagekitio/models/metadata.rbi +222 -23
- data/rbi/imagekitio/models/transformation.rbi +38 -0
- data/sig/imagekitio/models/metadata.rbs +182 -28
- data/sig/imagekitio/models/transformation.rbs +22 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fedc066efa6b23de05d5fbde2a58620df0367b19bc0fe3c4c4088c814341f371
|
|
4
|
+
data.tar.gz: e63e496269f464dfea1b230ae3db7d4dbb31139b776fb5b98204aa7ed53b8afb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86ce4087b4dc5d08936d4b0909b76cd134196ed0afb410c7dbdf101ea03acf7b6f6eff8857acd6738265a3eff8738b42dcd07e0971f63da0ee6252eb21edfb09
|
|
7
|
+
data.tar.gz: 785de1bdd7be3bcd73991b87789539b7cce8e1a45088cb477cef9c5d4dd57c0d3e1193f5f9e540cae9df28350ede54327a226a9f36356f2861da358ac64b984e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.6.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.5.1...v4.6.0) (2026-06-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* initial stlc build ([a2757e4](https://github.com/imagekit-developer/imagekit-ruby/commit/a2757e46e00bd414fd2de73c11eb53e01a7633dc))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* metadata response shape ([34e58cd](https://github.com/imagekit-developer/imagekit-ruby/commit/34e58cd2b3d0923881fc15d38e5dfbb32bef2991))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Chores
|
|
17
|
+
|
|
18
|
+
* Update webhook description ([1581227](https://github.com/imagekit-developer/imagekit-ruby/commit/15812270ccbe7e45a61ee94a4006fb5d02cf9921))
|
|
19
|
+
* Update webhook description ([7e2d29e](https://github.com/imagekit-developer/imagekit-ruby/commit/7e2d29e79c23729d2c2bf5ecbc0439ce53f66099))
|
|
20
|
+
|
|
21
|
+
## 4.5.1 (2026-05-17)
|
|
22
|
+
|
|
23
|
+
Full Changelog: [v4.5.0...v4.5.1](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.5.0...v4.5.1)
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **client:** elide content type header on requests without body ([9ae7bf6](https://github.com/imagekit-developer/imagekit-ruby/commit/9ae7bf673a15fc01cf7e25b6c508dd20fa6a38f7))
|
|
28
|
+
|
|
29
|
+
## 4.5.0 (2026-05-13)
|
|
30
|
+
|
|
31
|
+
Full Changelog: [v4.4.1...v4.5.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.4.1...v4.5.0)
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **api:** add no-enlarge crop modes and colorize transformation ([1b56303](https://github.com/imagekit-developer/imagekit-ruby/commit/1b56303ef5c67cb1a4b36d4a1c06b147f22c5987))
|
|
36
|
+
* support setting headers via env ([cd32783](https://github.com/imagekit-developer/imagekit-ruby/commit/cd32783efe49d795b8a5de49eb44039cda375d2e))
|
|
37
|
+
* **transformation:** add colorize transformation support in URL generation ([3454064](https://github.com/imagekit-developer/imagekit-ruby/commit/34540646f7ee8a1deabeea629f366d28bc71f734))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Chores
|
|
41
|
+
|
|
42
|
+
* **internal:** codegen related update ([7e0543d](https://github.com/imagekit-developer/imagekit-ruby/commit/7e0543d8714ff251de1a32f471dc7bd8bfa17dab))
|
|
43
|
+
|
|
3
44
|
## 4.4.1 (2026-04-24)
|
|
4
45
|
|
|
5
46
|
Full Changelog: [v4.4.0...v4.4.1](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.4.0...v4.4.1)
|
data/README.md
CHANGED
data/lib/imagekitio/client.rb
CHANGED
|
@@ -28,7 +28,7 @@ module Imagekitio
|
|
|
28
28
|
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
29
29
|
# `whsec_`). You can find this in the
|
|
30
30
|
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
31
|
-
# required if you
|
|
31
|
+
# required if you are using webhooks.
|
|
32
32
|
# @return [String, nil]
|
|
33
33
|
attr_reader :webhook_secret
|
|
34
34
|
|
|
@@ -90,7 +90,7 @@ module Imagekitio
|
|
|
90
90
|
# @param webhook_secret [String, nil] Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
91
91
|
# `whsec_`). You can find this in the
|
|
92
92
|
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
93
|
-
# required if you
|
|
93
|
+
# required if you are using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]`
|
|
94
94
|
#
|
|
95
95
|
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
|
96
96
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]`
|
|
@@ -120,6 +120,19 @@ module Imagekitio
|
|
|
120
120
|
raise ArgumentError.new("private_key is required, and can be set via environ: \"IMAGEKIT_PRIVATE_KEY\"")
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
+
headers = {}
|
|
124
|
+
custom_headers_env = ENV["IMAGE_KIT_CUSTOM_HEADERS"]
|
|
125
|
+
unless custom_headers_env.nil?
|
|
126
|
+
parsed = {}
|
|
127
|
+
custom_headers_env.split("\n").each do |line|
|
|
128
|
+
colon = line.index(":")
|
|
129
|
+
unless colon.nil?
|
|
130
|
+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
headers = parsed.merge(headers)
|
|
134
|
+
end
|
|
135
|
+
|
|
123
136
|
@private_key = private_key.to_s
|
|
124
137
|
@password = password.to_s
|
|
125
138
|
@webhook_secret = webhook_secret&.to_s
|
|
@@ -129,7 +142,8 @@ module Imagekitio
|
|
|
129
142
|
timeout: timeout,
|
|
130
143
|
max_retries: max_retries,
|
|
131
144
|
initial_retry_delay: initial_retry_delay,
|
|
132
|
-
max_retry_delay: max_retry_delay
|
|
145
|
+
max_retry_delay: max_retry_delay,
|
|
146
|
+
headers: headers
|
|
133
147
|
)
|
|
134
148
|
|
|
135
149
|
@custom_metadata_fields = Imagekitio::Resources::CustomMetadataFields.new(client: self)
|
|
@@ -306,6 +306,8 @@ module Imagekitio
|
|
|
306
306
|
Imagekitio::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
headers.delete("content-type") if body.nil?
|
|
310
|
+
|
|
309
311
|
url = Imagekitio::Internal::Util.join_parsed_uri(
|
|
310
312
|
@base_url_components,
|
|
311
313
|
{**req, path: path, query: query}
|
|
@@ -174,6 +174,11 @@ module Imagekitio
|
|
|
174
174
|
# @return [Float, nil]
|
|
175
175
|
optional :aperture_value, Float, api_name: :ApertureValue
|
|
176
176
|
|
|
177
|
+
# @!attribute brightness_value
|
|
178
|
+
#
|
|
179
|
+
# @return [Float, nil]
|
|
180
|
+
optional :brightness_value, Float, api_name: :BrightnessValue
|
|
181
|
+
|
|
177
182
|
# @!attribute color_space
|
|
178
183
|
#
|
|
179
184
|
# @return [Integer, nil]
|
|
@@ -246,8 +251,13 @@ module Imagekitio
|
|
|
246
251
|
|
|
247
252
|
# @!attribute focal_length
|
|
248
253
|
#
|
|
254
|
+
# @return [Float, nil]
|
|
255
|
+
optional :focal_length, Float, api_name: :FocalLength
|
|
256
|
+
|
|
257
|
+
# @!attribute focal_length_in35mm_format
|
|
258
|
+
#
|
|
249
259
|
# @return [Integer, nil]
|
|
250
|
-
optional :
|
|
260
|
+
optional :focal_length_in35mm_format, Integer, api_name: :FocalLengthIn35mmFormat
|
|
251
261
|
|
|
252
262
|
# @!attribute focal_plane_resolution_unit
|
|
253
263
|
#
|
|
@@ -274,6 +284,21 @@ module Imagekitio
|
|
|
274
284
|
# @return [Integer, nil]
|
|
275
285
|
optional :iso, Integer, api_name: :ISO
|
|
276
286
|
|
|
287
|
+
# @!attribute lens_model
|
|
288
|
+
#
|
|
289
|
+
# @return [String, nil]
|
|
290
|
+
optional :lens_model, String, api_name: :LensModel
|
|
291
|
+
|
|
292
|
+
# @!attribute light_source
|
|
293
|
+
#
|
|
294
|
+
# @return [Integer, nil]
|
|
295
|
+
optional :light_source, Integer, api_name: :LightSource
|
|
296
|
+
|
|
297
|
+
# @!attribute max_aperture_value
|
|
298
|
+
#
|
|
299
|
+
# @return [Float, nil]
|
|
300
|
+
optional :max_aperture_value, Float, api_name: :MaxApertureValue
|
|
301
|
+
|
|
277
302
|
# @!attribute metering_mode
|
|
278
303
|
#
|
|
279
304
|
# @return [Integer, nil]
|
|
@@ -284,6 +309,16 @@ module Imagekitio
|
|
|
284
309
|
# @return [Integer, nil]
|
|
285
310
|
optional :scene_capture_type, Integer, api_name: :SceneCaptureType
|
|
286
311
|
|
|
312
|
+
# @!attribute scene_type
|
|
313
|
+
#
|
|
314
|
+
# @return [String, nil]
|
|
315
|
+
optional :scene_type, String, api_name: :SceneType
|
|
316
|
+
|
|
317
|
+
# @!attribute sensing_method
|
|
318
|
+
#
|
|
319
|
+
# @return [Integer, nil]
|
|
320
|
+
optional :sensing_method, Integer, api_name: :SensingMethod
|
|
321
|
+
|
|
287
322
|
# @!attribute shutter_speed_value
|
|
288
323
|
#
|
|
289
324
|
# @return [Float, nil]
|
|
@@ -294,15 +329,21 @@ module Imagekitio
|
|
|
294
329
|
# @return [String, nil]
|
|
295
330
|
optional :sub_sec_time, String, api_name: :SubSecTime
|
|
296
331
|
|
|
332
|
+
# @!attribute user_comment
|
|
333
|
+
#
|
|
334
|
+
# @return [String, nil]
|
|
335
|
+
optional :user_comment, String, api_name: :UserComment
|
|
336
|
+
|
|
297
337
|
# @!attribute white_balance
|
|
298
338
|
#
|
|
299
339
|
# @return [Integer, nil]
|
|
300
340
|
optional :white_balance, Integer, api_name: :WhiteBalance
|
|
301
341
|
|
|
302
|
-
# @!method initialize(aperture_value: nil, color_space: nil, create_date: nil, custom_rendered: nil, date_time_original: nil, exif_image_height: nil, exif_image_width: nil, exif_version: nil, exposure_compensation: nil, exposure_mode: nil, exposure_program: nil, exposure_time: nil, flash: nil, flashpix_version: nil, f_number: nil, focal_length: nil, focal_plane_resolution_unit: nil, focal_plane_x_resolution: nil, focal_plane_y_resolution: nil, interop_offset: nil, iso: nil, metering_mode: nil, scene_capture_type: nil, shutter_speed_value: nil, sub_sec_time: nil, white_balance: nil)
|
|
342
|
+
# @!method initialize(aperture_value: nil, brightness_value: nil, color_space: nil, create_date: nil, custom_rendered: nil, date_time_original: nil, exif_image_height: nil, exif_image_width: nil, exif_version: nil, exposure_compensation: nil, exposure_mode: nil, exposure_program: nil, exposure_time: nil, flash: nil, flashpix_version: nil, f_number: nil, focal_length: nil, focal_length_in35mm_format: nil, focal_plane_resolution_unit: nil, focal_plane_x_resolution: nil, focal_plane_y_resolution: nil, interop_offset: nil, iso: nil, lens_model: nil, light_source: nil, max_aperture_value: nil, metering_mode: nil, scene_capture_type: nil, scene_type: nil, sensing_method: nil, shutter_speed_value: nil, sub_sec_time: nil, user_comment: nil, white_balance: nil)
|
|
303
343
|
# Object containing Exif details.
|
|
304
344
|
#
|
|
305
345
|
# @param aperture_value [Float]
|
|
346
|
+
# @param brightness_value [Float]
|
|
306
347
|
# @param color_space [Integer]
|
|
307
348
|
# @param create_date [String]
|
|
308
349
|
# @param custom_rendered [Integer]
|
|
@@ -317,34 +358,111 @@ module Imagekitio
|
|
|
317
358
|
# @param flash [Integer]
|
|
318
359
|
# @param flashpix_version [String]
|
|
319
360
|
# @param f_number [Float]
|
|
320
|
-
# @param focal_length [
|
|
361
|
+
# @param focal_length [Float]
|
|
362
|
+
# @param focal_length_in35mm_format [Integer]
|
|
321
363
|
# @param focal_plane_resolution_unit [Integer]
|
|
322
364
|
# @param focal_plane_x_resolution [Float]
|
|
323
365
|
# @param focal_plane_y_resolution [Float]
|
|
324
366
|
# @param interop_offset [Integer]
|
|
325
367
|
# @param iso [Integer]
|
|
368
|
+
# @param lens_model [String]
|
|
369
|
+
# @param light_source [Integer]
|
|
370
|
+
# @param max_aperture_value [Float]
|
|
326
371
|
# @param metering_mode [Integer]
|
|
327
372
|
# @param scene_capture_type [Integer]
|
|
373
|
+
# @param scene_type [String]
|
|
374
|
+
# @param sensing_method [Integer]
|
|
328
375
|
# @param shutter_speed_value [Float]
|
|
329
376
|
# @param sub_sec_time [String]
|
|
377
|
+
# @param user_comment [String]
|
|
330
378
|
# @param white_balance [Integer]
|
|
331
379
|
end
|
|
332
380
|
|
|
333
381
|
# @see Imagekitio::Models::Metadata::Exif#gps
|
|
334
382
|
class Gps < Imagekitio::Internal::Type::BaseModel
|
|
383
|
+
# @!attribute gps_altitude
|
|
384
|
+
#
|
|
385
|
+
# @return [Float, nil]
|
|
386
|
+
optional :gps_altitude, Float, api_name: :GPSAltitude
|
|
387
|
+
|
|
388
|
+
# @!attribute gps_altitude_ref
|
|
389
|
+
#
|
|
390
|
+
# @return [Integer, nil]
|
|
391
|
+
optional :gps_altitude_ref, Integer, api_name: :GPSAltitudeRef
|
|
392
|
+
|
|
393
|
+
# @!attribute gps_date_stamp
|
|
394
|
+
#
|
|
395
|
+
# @return [String, nil]
|
|
396
|
+
optional :gps_date_stamp, String, api_name: :GPSDateStamp
|
|
397
|
+
|
|
398
|
+
# @!attribute gps_img_direction
|
|
399
|
+
#
|
|
400
|
+
# @return [Float, nil]
|
|
401
|
+
optional :gps_img_direction, Float, api_name: :GPSImgDirection
|
|
402
|
+
|
|
403
|
+
# @!attribute gps_img_direction_ref
|
|
404
|
+
#
|
|
405
|
+
# @return [String, nil]
|
|
406
|
+
optional :gps_img_direction_ref, String, api_name: :GPSImgDirectionRef
|
|
407
|
+
|
|
408
|
+
# @!attribute gps_latitude
|
|
409
|
+
#
|
|
410
|
+
# @return [Array<Float>, nil]
|
|
411
|
+
optional :gps_latitude, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSLatitude
|
|
412
|
+
|
|
413
|
+
# @!attribute gps_latitude_ref
|
|
414
|
+
#
|
|
415
|
+
# @return [String, nil]
|
|
416
|
+
optional :gps_latitude_ref, String, api_name: :GPSLatitudeRef
|
|
417
|
+
|
|
418
|
+
# @!attribute gps_longitude
|
|
419
|
+
#
|
|
420
|
+
# @return [Array<Float>, nil]
|
|
421
|
+
optional :gps_longitude, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSLongitude
|
|
422
|
+
|
|
423
|
+
# @!attribute gps_longitude_ref
|
|
424
|
+
#
|
|
425
|
+
# @return [String, nil]
|
|
426
|
+
optional :gps_longitude_ref, String, api_name: :GPSLongitudeRef
|
|
427
|
+
|
|
428
|
+
# @!attribute gps_time_stamp
|
|
429
|
+
#
|
|
430
|
+
# @return [Array<Float>, nil]
|
|
431
|
+
optional :gps_time_stamp, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSTimeStamp
|
|
432
|
+
|
|
335
433
|
# @!attribute gps_version_id
|
|
336
434
|
#
|
|
337
435
|
# @return [Array<Integer>, nil]
|
|
338
436
|
optional :gps_version_id, Imagekitio::Internal::Type::ArrayOf[Integer], api_name: :GPSVersionID
|
|
339
437
|
|
|
340
|
-
# @!method initialize(gps_version_id: nil)
|
|
438
|
+
# @!method initialize(gps_altitude: nil, gps_altitude_ref: nil, gps_date_stamp: nil, gps_img_direction: nil, gps_img_direction_ref: nil, gps_latitude: nil, gps_latitude_ref: nil, gps_longitude: nil, gps_longitude_ref: nil, gps_time_stamp: nil, gps_version_id: nil)
|
|
341
439
|
# Object containing GPS information.
|
|
342
440
|
#
|
|
441
|
+
# @param gps_altitude [Float]
|
|
442
|
+
# @param gps_altitude_ref [Integer]
|
|
443
|
+
# @param gps_date_stamp [String]
|
|
444
|
+
# @param gps_img_direction [Float]
|
|
445
|
+
# @param gps_img_direction_ref [String]
|
|
446
|
+
# @param gps_latitude [Array<Float>]
|
|
447
|
+
# @param gps_latitude_ref [String]
|
|
448
|
+
# @param gps_longitude [Array<Float>]
|
|
449
|
+
# @param gps_longitude_ref [String]
|
|
450
|
+
# @param gps_time_stamp [Array<Float>]
|
|
343
451
|
# @param gps_version_id [Array<Integer>]
|
|
344
452
|
end
|
|
345
453
|
|
|
346
454
|
# @see Imagekitio::Models::Metadata::Exif#image
|
|
347
455
|
class Image < Imagekitio::Internal::Type::BaseModel
|
|
456
|
+
# @!attribute artist
|
|
457
|
+
#
|
|
458
|
+
# @return [String, nil]
|
|
459
|
+
optional :artist, String, api_name: :Artist
|
|
460
|
+
|
|
461
|
+
# @!attribute copyright
|
|
462
|
+
#
|
|
463
|
+
# @return [String, nil]
|
|
464
|
+
optional :copyright, String, api_name: :Copyright
|
|
465
|
+
|
|
348
466
|
# @!attribute exif_offset
|
|
349
467
|
#
|
|
350
468
|
# @return [Integer, nil]
|
|
@@ -355,6 +473,11 @@ module Imagekitio
|
|
|
355
473
|
# @return [Integer, nil]
|
|
356
474
|
optional :gps_info, Integer, api_name: :GPSInfo
|
|
357
475
|
|
|
476
|
+
# @!attribute image_description
|
|
477
|
+
#
|
|
478
|
+
# @return [String, nil]
|
|
479
|
+
optional :image_description, String, api_name: :ImageDescription
|
|
480
|
+
|
|
358
481
|
# @!attribute make
|
|
359
482
|
#
|
|
360
483
|
# @return [String, nil]
|
|
@@ -387,8 +510,8 @@ module Imagekitio
|
|
|
387
510
|
|
|
388
511
|
# @!attribute x_resolution
|
|
389
512
|
#
|
|
390
|
-
# @return [
|
|
391
|
-
optional :x_resolution,
|
|
513
|
+
# @return [Float, nil]
|
|
514
|
+
optional :x_resolution, Float, api_name: :XResolution
|
|
392
515
|
|
|
393
516
|
# @!attribute y_cb_cr_positioning
|
|
394
517
|
#
|
|
@@ -397,23 +520,26 @@ module Imagekitio
|
|
|
397
520
|
|
|
398
521
|
# @!attribute y_resolution
|
|
399
522
|
#
|
|
400
|
-
# @return [
|
|
401
|
-
optional :y_resolution,
|
|
523
|
+
# @return [Float, nil]
|
|
524
|
+
optional :y_resolution, Float, api_name: :YResolution
|
|
402
525
|
|
|
403
|
-
# @!method initialize(exif_offset: nil, gps_info: nil, make: nil, model: nil, modify_date: nil, orientation: nil, resolution_unit: nil, software: nil, x_resolution: nil, y_cb_cr_positioning: nil, y_resolution: nil)
|
|
526
|
+
# @!method initialize(artist: nil, copyright: nil, exif_offset: nil, gps_info: nil, image_description: nil, make: nil, model: nil, modify_date: nil, orientation: nil, resolution_unit: nil, software: nil, x_resolution: nil, y_cb_cr_positioning: nil, y_resolution: nil)
|
|
404
527
|
# Object containing EXIF image information.
|
|
405
528
|
#
|
|
529
|
+
# @param artist [String]
|
|
530
|
+
# @param copyright [String]
|
|
406
531
|
# @param exif_offset [Integer]
|
|
407
532
|
# @param gps_info [Integer]
|
|
533
|
+
# @param image_description [String]
|
|
408
534
|
# @param make [String]
|
|
409
535
|
# @param model [String]
|
|
410
536
|
# @param modify_date [String]
|
|
411
537
|
# @param orientation [Integer]
|
|
412
538
|
# @param resolution_unit [Integer]
|
|
413
539
|
# @param software [String]
|
|
414
|
-
# @param x_resolution [
|
|
540
|
+
# @param x_resolution [Float]
|
|
415
541
|
# @param y_cb_cr_positioning [Integer]
|
|
416
|
-
# @param y_resolution [
|
|
542
|
+
# @param y_resolution [Float]
|
|
417
543
|
end
|
|
418
544
|
|
|
419
545
|
# @see Imagekitio::Models::Metadata::Exif#interoperability
|
|
@@ -459,13 +585,13 @@ module Imagekitio
|
|
|
459
585
|
|
|
460
586
|
# @!attribute x_resolution
|
|
461
587
|
#
|
|
462
|
-
# @return [
|
|
463
|
-
optional :x_resolution,
|
|
588
|
+
# @return [Float, nil]
|
|
589
|
+
optional :x_resolution, Float, api_name: :XResolution
|
|
464
590
|
|
|
465
591
|
# @!attribute y_resolution
|
|
466
592
|
#
|
|
467
|
-
# @return [
|
|
468
|
-
optional :y_resolution,
|
|
593
|
+
# @return [Float, nil]
|
|
594
|
+
optional :y_resolution, Float, api_name: :YResolution
|
|
469
595
|
|
|
470
596
|
# @!method initialize(compression: nil, resolution_unit: nil, thumbnail_length: nil, thumbnail_offset: nil, x_resolution: nil, y_resolution: nil)
|
|
471
597
|
# Object containing Thumbnail information.
|
|
@@ -474,8 +600,8 @@ module Imagekitio
|
|
|
474
600
|
# @param resolution_unit [Integer]
|
|
475
601
|
# @param thumbnail_length [Integer]
|
|
476
602
|
# @param thumbnail_offset [Integer]
|
|
477
|
-
# @param x_resolution [
|
|
478
|
-
# @param y_resolution [
|
|
603
|
+
# @param x_resolution [Float]
|
|
604
|
+
# @param y_resolution [Float]
|
|
479
605
|
end
|
|
480
606
|
end
|
|
481
607
|
end
|
|
@@ -138,6 +138,18 @@ module Imagekitio
|
|
|
138
138
|
# @return [String, nil]
|
|
139
139
|
optional :border, String
|
|
140
140
|
|
|
141
|
+
# @!attribute colorize
|
|
142
|
+
# Applies a color tint to the image. Accepts color and intensity as optional
|
|
143
|
+
# parameters.
|
|
144
|
+
#
|
|
145
|
+
# - `co-color` - Color to apply (e.g., `red`, `blue`, `FF0022`). Default is gray
|
|
146
|
+
# color.
|
|
147
|
+
# - `in-intensity` - Intensity of the color (0-100). Default is 35. See
|
|
148
|
+
# [Colorize](https://imagekit.io/docs/effects-and-enhancements#colorize---e-colorize).
|
|
149
|
+
#
|
|
150
|
+
# @return [String, nil]
|
|
151
|
+
optional :colorize, String
|
|
152
|
+
|
|
141
153
|
# @!attribute color_profile
|
|
142
154
|
# Indicates whether the output image should retain the original color profile. See
|
|
143
155
|
# [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
|
|
@@ -498,7 +510,7 @@ module Imagekitio
|
|
|
498
510
|
# @return [Float, nil]
|
|
499
511
|
optional :zoom, Float
|
|
500
512
|
|
|
501
|
-
# @!method initialize(ai_change_background: nil, ai_drop_shadow: nil, ai_edit: nil, ai_remove_background: nil, ai_remove_background_external: nil, ai_retouch: nil, ai_upscale: nil, ai_variation: nil, aspect_ratio: nil, audio_codec: nil, background: nil, blur: nil, border: nil, color_profile: nil, color_replace: nil, contrast_stretch: nil, crop: nil, crop_mode: nil, default_image: nil, distort: nil, dpr: nil, duration: nil, end_offset: nil, flip: nil, focus: nil, format_: nil, gradient: nil, grayscale: nil, height: nil, lossless: nil, metadata: nil, named: nil, opacity: nil, original: nil, overlay: nil, page: nil, progressive: nil, quality: nil, radius: nil, raw: nil, rotation: nil, shadow: nil, sharpen: nil, start_offset: nil, streaming_resolutions: nil, trim: nil, unsharp_mask: nil, video_codec: nil, width: nil, x: nil, x_center: nil, y_: nil, y_center: nil, zoom: nil)
|
|
513
|
+
# @!method initialize(ai_change_background: nil, ai_drop_shadow: nil, ai_edit: nil, ai_remove_background: nil, ai_remove_background_external: nil, ai_retouch: nil, ai_upscale: nil, ai_variation: nil, aspect_ratio: nil, audio_codec: nil, background: nil, blur: nil, border: nil, colorize: nil, color_profile: nil, color_replace: nil, contrast_stretch: nil, crop: nil, crop_mode: nil, default_image: nil, distort: nil, dpr: nil, duration: nil, end_offset: nil, flip: nil, focus: nil, format_: nil, gradient: nil, grayscale: nil, height: nil, lossless: nil, metadata: nil, named: nil, opacity: nil, original: nil, overlay: nil, page: nil, progressive: nil, quality: nil, radius: nil, raw: nil, rotation: nil, shadow: nil, sharpen: nil, start_offset: nil, streaming_resolutions: nil, trim: nil, unsharp_mask: nil, video_codec: nil, width: nil, x: nil, x_center: nil, y_: nil, y_center: nil, zoom: nil)
|
|
502
514
|
# Some parameter documentations has been truncated, see
|
|
503
515
|
# {Imagekitio::Models::Transformation} for more details.
|
|
504
516
|
#
|
|
@@ -535,6 +547,8 @@ module Imagekitio
|
|
|
535
547
|
#
|
|
536
548
|
# @param border [String] Adds a border to the output media. Accepts a string in the format `<border-width
|
|
537
549
|
#
|
|
550
|
+
# @param colorize [String] Applies a color tint to the image. Accepts color and intensity as optional param
|
|
551
|
+
#
|
|
538
552
|
# @param color_profile [Boolean] Indicates whether the output image should retain the original color profile.
|
|
539
553
|
#
|
|
540
554
|
# @param color_replace [String] Replaces colors in the image. Supports three formats:
|
|
@@ -765,6 +779,7 @@ module Imagekitio
|
|
|
765
779
|
AT_MAX_ENLARGE = :at_max_enlarge
|
|
766
780
|
AT_LEAST = :at_least
|
|
767
781
|
MAINTAIN_RATIO = :maintain_ratio
|
|
782
|
+
MAINTAIN_RATIO_NO_ENLARGE = :maintain_ratio_no_enlarge
|
|
768
783
|
|
|
769
784
|
# @!method self.values
|
|
770
785
|
# @return [Array<Symbol>]
|
|
@@ -780,6 +795,8 @@ module Imagekitio
|
|
|
780
795
|
PAD_RESIZE = :pad_resize
|
|
781
796
|
EXTRACT = :extract
|
|
782
797
|
PAD_EXTRACT = :pad_extract
|
|
798
|
+
PAD_RESIZE_NO_ENLARGE = :pad_resize_no_enlarge
|
|
799
|
+
PAD_EXTRACT_NO_SHRINK = :pad_extract_no_shrink
|
|
783
800
|
|
|
784
801
|
# @!method self.values
|
|
785
802
|
# @return [Array<Symbol>]
|
data/lib/imagekitio/version.rb
CHANGED
data/rbi/imagekitio/client.rbi
CHANGED
|
@@ -23,7 +23,7 @@ module Imagekitio
|
|
|
23
23
|
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
24
24
|
# `whsec_`). You can find this in the
|
|
25
25
|
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
26
|
-
# required if you
|
|
26
|
+
# required if you are using webhooks.
|
|
27
27
|
sig { returns(T.nilable(String)) }
|
|
28
28
|
attr_reader :webhook_secret
|
|
29
29
|
|
|
@@ -92,7 +92,7 @@ module Imagekitio
|
|
|
92
92
|
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
93
93
|
# `whsec_`). You can find this in the
|
|
94
94
|
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
95
|
-
# required if you
|
|
95
|
+
# required if you are using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]`
|
|
96
96
|
webhook_secret: ENV["IMAGEKIT_WEBHOOK_SECRET"],
|
|
97
97
|
# Override the default base URL for the API, e.g.,
|
|
98
98
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]`
|