Class: Imagekitio::Models::Transformation
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::Transformation
- Defined in:
- lib/imagekitio/models/transformation.rb,
sig/imagekitio/models/transformation.rbs
Defined Under Namespace
Modules: AIDropShadow, AIRemoveBackground, AIRemoveBackgroundExternal, AIRetouch, AIUpscale, AIVariation, AspectRatio, AudioCodec, ContrastStretch, Crop, CropMode, Duration, EndOffset, Flip, Format, Gradient, Grayscale, Height, Page, Radius, Rotation, Shadow, Sharpen, StartOffset, Trim, UnsharpMask, VideoCodec, Width, X, XCenter, Y, YCenter
Instance Attribute Summary collapse
-
#ai_change_background ⇒ String?
Uses AI to change the background.
-
#ai_drop_shadow ⇒ Boolean, ...
Adds an AI-based drop shadow around a foreground object on a transparent or removed background.
-
#ai_edit ⇒ String?
Uses AI to edit images based on a text prompt.
-
#ai_remove_background ⇒ Boolean, ...
Applies ImageKit's in-house background removal.
-
#ai_remove_background_external ⇒ Boolean, ...
Uses third-party background removal.
-
#ai_retouch ⇒ Boolean, ...
Performs AI-based retouching to improve faces or product shots.
-
#ai_upscale ⇒ Boolean, ...
Upscales images beyond their original dimensions using AI.
-
#ai_variation ⇒ Boolean, ...
Generates a variation of an image using AI.
-
#aspect_ratio ⇒ Float, ...
Specifies the aspect ratio for the output, e.g., "ar-4-3".
-
#audio_codec ⇒ Symbol, ...
Specifies the audio codec, e.g.,
aac,opus, ornone. -
#background ⇒ String?
Specifies the background to be used in conjunction with certain cropping strategies when resizing an image.
-
#blur ⇒ Float?
Specifies the Gaussian blur level.
-
#border ⇒ String?
Adds a border to the output media.
-
#color_profile ⇒ Boolean?
Indicates whether the output image should retain the original color profile.
-
#color_replace ⇒ String?
Replaces colors in the image.
-
#colorize ⇒ String?
Applies a color tint to the image.
-
#contrast_stretch ⇒ Boolean, ...
Automatically enhances the contrast of an image (contrast stretch).
-
#crop ⇒ Symbol, ...
Crop modes for image resizing.
-
#crop_mode ⇒ Symbol, ...
Additional crop modes for image resizing.
-
#default_image ⇒ String?
Specifies a fallback image if the resource is not found, e.g., a URL or file path.
-
#distort ⇒ String?
Distorts the shape of an image.
-
#dpr ⇒ Float?
Accepts values between 0.1 and 5, or
autofor automatic device pixel ratio (DPR) calculation. -
#duration ⇒ Float, ...
Specifies the duration (in seconds) for trimming videos, e.g.,
5or10.5. -
#end_offset ⇒ Float, ...
Specifies the end offset (in seconds) for trimming videos, e.g.,
5or10.5. -
#flip ⇒ Symbol, ...
Flips or mirrors an image either horizontally, vertically, or both.
-
#focus ⇒ String?
Refines padding and cropping behavior for pad resize, maintain ratio, and extract crop modes.
-
#format_ ⇒ Symbol, ...
Specifies the output format for images or videos, e.g.,
jpg,png,webp,mp4, orauto. -
#gradient ⇒ Boolean, ...
Creates a linear gradient with two colors.
-
#grayscale ⇒ Boolean, ...
Enables a grayscale effect for images.
-
#height ⇒ Float, ...
Specifies the height of the output.
-
#lossless ⇒ Boolean?
Specifies whether the output image (in JPEG or PNG) should be compressed losslessly.
-
#metadata ⇒ Boolean?
By default, ImageKit removes all metadata during automatic image compression.
-
#named ⇒ String?
Named transformation reference.
-
#opacity ⇒ Float?
Specifies the opacity level of the output image.
-
#original ⇒ Boolean?
If set to true, serves the original file without applying any transformations.
-
#overlay ⇒ Imagekitio::Models::Overlay?
Specifies an overlay to be applied on the parent image or video.
-
#page ⇒ Float, ...
Extracts a specific page or frame from multi-page or layered files (PDF, PSD, AI).
-
#progressive ⇒ Boolean?
Specifies whether the output JPEG image should be rendered progressively.
-
#quality ⇒ Float?
Specifies the quality of the output image for lossy formats such as JPEG, WebP, and AVIF.
-
#radius ⇒ Float, ...
Specifies the corner radius for rounded corners.
-
#raw ⇒ String?
Pass any transformation not directly supported by the SDK.
-
#rotation ⇒ Float, ...
Specifies the rotation angle in degrees.
-
#shadow ⇒ Boolean, ...
Adds a shadow beneath solid objects in an image with a transparent background.
-
#sharpen ⇒ Boolean, ...
Sharpens the input image, highlighting edges and finer details.
-
#start_offset ⇒ Float, ...
Specifies the start offset (in seconds) for trimming videos, e.g.,
5or10.5. -
#streaming_resolutions ⇒ Array<Symbol, Imagekitio::Models::StreamingResolution>?
An array of resolutions for adaptive bitrate streaming, e.g., [
240,360,480,720,1080]. -
#trim ⇒ Boolean, ...
Useful for images with a solid or nearly solid background and a central object.
-
#unsharp_mask ⇒ Boolean, ...
Applies Unsharp Masking (USM), an image sharpening technique.
-
#video_codec ⇒ Symbol, ...
Specifies the video codec, e.g.,
h264,vp9,av1, ornone. -
#width ⇒ Float, ...
Specifies the width of the output.
-
#x ⇒ Float, ...
Focus using cropped image coordinates - X coordinate.
-
#x_center ⇒ Float, ...
Focus using cropped image coordinates - X center coordinate.
-
#y_ ⇒ Float, ...
Focus using cropped image coordinates - Y coordinate.
-
#y_center ⇒ Float, ...
Focus using cropped image coordinates - Y center coordinate.
-
#zoom ⇒ Float?
Accepts a numeric value that determines how much to zoom in or out of the cropped area.
Class Method Summary collapse
Instance Method Summary collapse
-
#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) ⇒ Object
constructor
Some parameter documentations has been truncated, see Transformation for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#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) ⇒ Object
Some parameter documentations has been truncated, see Imagekitio::Models::Transformation for more details.
The SDK provides easy-to-use names for transformations. These names are
converted to the corresponding transformation string before being added to the
URL. SDKs are updated regularly to support new transformations. If you want to
use a transformation that is not supported by the SDK, You can use the raw
parameter to pass the transformation string directly. See the
Transformations documentation.
|
|
# File 'lib/imagekitio/models/transformation.rb', line 513
|
Instance Attribute Details
#ai_change_background ⇒ String?
Uses AI to change the background. Provide a text prompt or a base64-encoded
prompt, e.g., prompt-snow road or prompte-[urlencoded_base64_encoded_text].
Not supported inside overlay. See
AI Change Background.
13 |
# File 'lib/imagekitio/models/transformation.rb', line 13 optional :ai_change_background, String, api_name: :aiChangeBackground |
#ai_drop_shadow ⇒ Boolean, ...
Adds an AI-based drop shadow around a foreground object on a transparent or
removed background. Optionally, control the direction, elevation, and saturation
of the light source (e.g., az-45 to change light direction). Pass true for
the default drop shadow, or provide a string for a custom drop shadow. Supported
inside overlay. See
AI Drop Shadow.
24 25 26 27 28 |
# File 'lib/imagekitio/models/transformation.rb', line 24 optional :ai_drop_shadow, union: -> { Imagekitio::Transformation::AIDropShadow }, api_name: :aiDropShadow |
#ai_edit ⇒ String?
Uses AI to edit images based on a text prompt. Provide a text prompt or a
base64-encoded prompt, e.g., prompt-snow road or
prompte-[urlencoded_base64_encoded_text]. Not supported inside overlay.
See AI Edit.
37 |
# File 'lib/imagekitio/models/transformation.rb', line 37 optional :ai_edit, String, api_name: :aiEdit |
#ai_remove_background ⇒ Boolean, ...
Applies ImageKit's in-house background removal. Supported inside overlay. See AI Background Removal.
44 45 46 |
# File 'lib/imagekitio/models/transformation.rb', line 44 optional :ai_remove_background, enum: -> { Imagekitio::Transformation::AIRemoveBackground }, api_name: :aiRemoveBackground |
#ai_remove_background_external ⇒ Boolean, ...
Uses third-party background removal. Note: It is recommended to use aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective. Supported inside overlay. See External Background Removal.
55 56 57 |
# File 'lib/imagekitio/models/transformation.rb', line 55 optional :ai_remove_background_external, enum: -> { Imagekitio::Transformation::AIRemoveBackgroundExternal }, api_name: :aiRemoveBackgroundExternal |
#ai_retouch ⇒ Boolean, ...
Performs AI-based retouching to improve faces or product shots. Not supported inside overlay. See AI Retouch.
65 |
# File 'lib/imagekitio/models/transformation.rb', line 65 optional :ai_retouch, enum: -> { Imagekitio::Transformation::AIRetouch }, api_name: :aiRetouch |
#ai_upscale ⇒ Boolean, ...
Upscales images beyond their original dimensions using AI. Not supported inside overlay. See AI Upscale.
73 |
# File 'lib/imagekitio/models/transformation.rb', line 73 optional :ai_upscale, enum: -> { Imagekitio::Transformation::AIUpscale }, api_name: :aiUpscale |
#ai_variation ⇒ Boolean, ...
Generates a variation of an image using AI. This produces a new image with slight variations from the original, such as changes in color, texture, and other visual elements, while preserving the structure and essence of the original image. Not supported inside overlay. See AI Generate Variations.
83 |
# File 'lib/imagekitio/models/transformation.rb', line 83 optional :ai_variation, enum: -> { Imagekitio::Transformation::AIVariation }, api_name: :aiVariation |
#aspect_ratio ⇒ Float, ...
Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with
either width or height (but not both). For example: aspectRatio = 4:3, 4_3,
or an expression like iar_div_2. See
Image resize and crop – Aspect ratio.
92 |
# File 'lib/imagekitio/models/transformation.rb', line 92 optional :aspect_ratio, union: -> { Imagekitio::Transformation::AspectRatio }, api_name: :aspectRatio |
#audio_codec ⇒ Symbol, ...
Specifies the audio codec, e.g., aac, opus, or none. See
Audio codec.
99 |
# File 'lib/imagekitio/models/transformation.rb', line 99 optional :audio_codec, enum: -> { Imagekitio::Transformation::AudioCodec }, api_name: :audioCodec |
#background ⇒ String?
Specifies the background to be used in conjunction with certain cropping strategies when resizing an image.
- A solid color: e.g.,
red,F3F3F3,AAFF0010. See Solid color background. - Dominant color:
dominantextracts the dominant color from the image. See Dominant color background. - Gradient:
gradient_dominantorgradient_dominant_2creates a gradient using the dominant colors. Optionally specify palette size (2 or 4), e.g.,gradient_dominant_4. See Gradient background. - A blurred background: e.g.,
blurred,blurred_25_N15, etc. See Blurred background. - Expand the image boundaries using generative fill:
genfill. Not supported inside overlay. Optionally, control the background scene by passing a text prompt:genfill[:-prompt-${text}]orgenfill[:-prompte-${urlencoded_base64_encoded_text}]. See Generative fill background.
122 |
# File 'lib/imagekitio/models/transformation.rb', line 122 optional :background, String |
#blur ⇒ Float?
Specifies the Gaussian blur level. Accepts an integer value between 1 and 100,
or an expression like bl-10. See
Blur.
130 |
# File 'lib/imagekitio/models/transformation.rb', line 130 optional :blur, Float |
#border ⇒ String?
Adds a border to the output media. Accepts a string in the format
<border-width>_<hex-code> (e.g., 5_FFF000 for a 5px yellow border), or an
expression like ih_div_20_FF00FF. See
Border.
139 |
# File 'lib/imagekitio/models/transformation.rb', line 139 optional :border, String |
#color_profile ⇒ Boolean?
Indicates whether the output image should retain the original color profile. See Color profile.
158 |
# File 'lib/imagekitio/models/transformation.rb', line 158 optional :color_profile, Imagekitio::Internal::Type::Boolean, api_name: :colorProfile |
#color_replace ⇒ String?
Replaces colors in the image. Supports three formats:
toColor- Replace dominant color with the specified color.toColor_tolerance- Replace dominant color with specified tolerance (0-100).toColor_tolerance_fromColor- Replace a specific color with another within tolerance range. Colors can be hex codes (e.g.,FF0022) or names (e.g.,red,blue). See Color replacement.
171 |
# File 'lib/imagekitio/models/transformation.rb', line 171 optional :color_replace, String, api_name: :colorReplace |
#colorize ⇒ String?
Applies a color tint to the image. Accepts color and intensity as optional parameters.
co-color- Color to apply (e.g.,red,blue,FF0022). Default is gray color.in-intensity- Intensity of the color (0-100). Default is 100. See Colorize.
151 |
# File 'lib/imagekitio/models/transformation.rb', line 151 optional :colorize, String |
#contrast_stretch ⇒ Boolean, ...
Automatically enhances the contrast of an image (contrast stretch). See Contrast Stretch.
178 179 180 |
# File 'lib/imagekitio/models/transformation.rb', line 178 optional :contrast_stretch, enum: -> { Imagekitio::Transformation::ContrastStretch }, api_name: :contrastStretch |
#crop ⇒ Symbol, ...
Crop modes for image resizing. See Crop modes & focus.
187 |
# File 'lib/imagekitio/models/transformation.rb', line 187 optional :crop, enum: -> { Imagekitio::Transformation::Crop } |
#crop_mode ⇒ Symbol, ...
Additional crop modes for image resizing. See Crop modes & focus.
194 |
# File 'lib/imagekitio/models/transformation.rb', line 194 optional :crop_mode, enum: -> { Imagekitio::Transformation::CropMode }, api_name: :cropMode |
#default_image ⇒ String?
Specifies a fallback image if the resource is not found, e.g., a URL or file path. See Default image.
202 |
# File 'lib/imagekitio/models/transformation.rb', line 202 optional :default_image, String, api_name: :defaultImage |
#distort ⇒ String?
Distorts the shape of an image. Supports two modes:
- Perspective distortion:
p-x1_y1_x2_y2_x3_y3_x4_y4changes the position of the four corners starting clockwise from top-left. - Arc distortion:
a-degreescurves the image upwards (positive values) or downwards (negative values). See Distort effect.
214 |
# File 'lib/imagekitio/models/transformation.rb', line 214 optional :distort, String |
#dpr ⇒ Float?
Accepts values between 0.1 and 5, or auto for automatic device pixel ratio
(DPR) calculation. Also accepts arithmetic expressions.
- Learn about Arithmetic expressions.
- See DPR.
225 |
# File 'lib/imagekitio/models/transformation.rb', line 225 optional :dpr, Float |
#duration ⇒ Float, ...
Specifies the duration (in seconds) for trimming videos, e.g., 5 or 10.5.
Typically used with startOffset to indicate the length from the start offset.
Arithmetic expressions are supported. See
Trim videos – Duration.
234 |
# File 'lib/imagekitio/models/transformation.rb', line 234 optional :duration, union: -> { Imagekitio::Transformation::Duration } |
#end_offset ⇒ Float, ...
Specifies the end offset (in seconds) for trimming videos, e.g., 5 or 10.5.
Typically used with startOffset to define a time window. Arithmetic expressions
are supported. See
Trim videos – End offset.
243 |
# File 'lib/imagekitio/models/transformation.rb', line 243 optional :end_offset, union: -> { Imagekitio::Transformation::EndOffset }, api_name: :endOffset |
#flip ⇒ Symbol, ...
Flips or mirrors an image either horizontally, vertically, or both. Acceptable
values: h (horizontal), v (vertical), h_v (horizontal and vertical), or
v_h. See Flip.
251 |
# File 'lib/imagekitio/models/transformation.rb', line 251 optional :flip, enum: -> { Imagekitio::Transformation::Flip } |
#focus ⇒ String?
Refines padding and cropping behavior for pad resize, maintain ratio, and
extract crop modes. Supports manual positions and coordinate-based focus. With
AI-based cropping, you can automatically keep key subjects in frame—such as
faces or detected objects (e.g., fo-face, fo-person, fo-car)— while
resizing.
264 |
# File 'lib/imagekitio/models/transformation.rb', line 264 optional :focus, String |
#format_ ⇒ Symbol, ...
Specifies the output format for images or videos, e.g., jpg, png, webp,
mp4, or auto. You can also pass orig for images to return the original
format. ImageKit automatically delivers images and videos in the optimal format
based on device support unless overridden by the dashboard settings or the
format parameter. See
Image format and
Video format.
276 |
# File 'lib/imagekitio/models/transformation.rb', line 276 optional :format_, enum: -> { Imagekitio::Transformation::Format }, api_name: :format |
#gradient ⇒ Boolean, ...
Creates a linear gradient with two colors. Pass true for a default gradient,
or provide a string for a custom gradient. See
Gradient.
284 |
# File 'lib/imagekitio/models/transformation.rb', line 284 optional :gradient, union: -> { Imagekitio::Transformation::Gradient } |
#grayscale ⇒ Boolean, ...
Enables a grayscale effect for images. See Grayscale.
291 |
# File 'lib/imagekitio/models/transformation.rb', line 291 optional :grayscale, enum: -> { Imagekitio::Transformation::Grayscale } |
#height ⇒ Float, ...
302 |
# File 'lib/imagekitio/models/transformation.rb', line 302 optional :height, union: -> { Imagekitio::Transformation::Height } |
#lossless ⇒ Boolean?
Specifies whether the output image (in JPEG or PNG) should be compressed losslessly. See Lossless compression.
310 |
# File 'lib/imagekitio/models/transformation.rb', line 310 optional :lossless, Imagekitio::Internal::Type::Boolean |
#metadata ⇒ Boolean?
By default, ImageKit removes all metadata during automatic image compression. Set this to true to preserve metadata. See Image metadata.
318 |
# File 'lib/imagekitio/models/transformation.rb', line 318 optional :metadata, Imagekitio::Internal::Type::Boolean |
#named ⇒ String?
Named transformation reference. See Named transformations.
325 |
# File 'lib/imagekitio/models/transformation.rb', line 325 optional :named, String |
#opacity ⇒ Float?
Specifies the opacity level of the output image. See Opacity.
332 |
# File 'lib/imagekitio/models/transformation.rb', line 332 optional :opacity, Float |
#original ⇒ Boolean?
If set to true, serves the original file without applying any transformations. See Deliver original file as-is.
340 |
# File 'lib/imagekitio/models/transformation.rb', line 340 optional :original, Imagekitio::Internal::Type::Boolean |
#overlay ⇒ Imagekitio::Models::Overlay?
Specifies an overlay to be applied on the parent image or video. ImageKit supports overlays including images, text, videos, subtitles, and solid colors. See Overlay using layers.
349 |
# File 'lib/imagekitio/models/transformation.rb', line 349 optional :overlay, union: -> { Imagekitio::Overlay } |
#page ⇒ Float, ...
Extracts a specific page or frame from multi-page or layered files (PDF, PSD,
AI). For example, specify by number (e.g., 2), a range (e.g., 3-4 for the
2nd and 3rd layers), or by name (e.g., name-layer-4 for a PSD layer). See
Thumbnail extraction.
358 |
# File 'lib/imagekitio/models/transformation.rb', line 358 optional :page, union: -> { Imagekitio::Transformation::Page } |
#progressive ⇒ Boolean?
Specifies whether the output JPEG image should be rendered progressively. Progressive loading begins with a low-quality, pixelated version of the full image, which gradually improves to provide a faster perceived load time. See Progressive images.
367 |
# File 'lib/imagekitio/models/transformation.rb', line 367 optional :progressive, Imagekitio::Internal::Type::Boolean |
#quality ⇒ Float?
Specifies the quality of the output image for lossy formats such as JPEG, WebP, and AVIF. A higher quality value results in a larger file size with better quality, while a lower value produces a smaller file size with reduced quality. See Quality.
376 |
# File 'lib/imagekitio/models/transformation.rb', line 376 optional :quality, Float |
#radius ⇒ Float, ...
Specifies the corner radius for rounded corners.
- Single value (positive integer): Applied to all corners (e.g.,
20). max: Creates a circular or oval shape.- Per-corner array: Provide four underscore-separated values representing
top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
10_20_30_40). See Radius.
389 |
# File 'lib/imagekitio/models/transformation.rb', line 389 optional :radius, union: -> { Imagekitio::Transformation::Radius } |
#raw ⇒ String?
Pass any transformation not directly supported by the SDK. This transformation string is appended to the URL as provided.
396 |
# File 'lib/imagekitio/models/transformation.rb', line 396 optional :raw, String |
#rotation ⇒ Float, ...
Specifies the rotation angle in degrees. Positive values rotate the image
clockwise; you can also use, for example, N40 for counterclockwise rotation or
auto to use the orientation specified in the image's EXIF data. For videos,
only the following values are supported: 0, 90, 180, 270, or 360. See
Rotate.
406 |
# File 'lib/imagekitio/models/transformation.rb', line 406 optional :rotation, union: -> { Imagekitio::Transformation::Rotation } |
#shadow ⇒ Boolean, ...
Adds a shadow beneath solid objects in an image with a transparent background.
For AI-based drop shadows, refer to aiDropShadow. Pass true for a default
shadow, or provide a string for a custom shadow. See
Shadow.
415 |
# File 'lib/imagekitio/models/transformation.rb', line 415 optional :shadow, union: -> { Imagekitio::Transformation::Shadow } |
#sharpen ⇒ Boolean, ...
Sharpens the input image, highlighting edges and finer details. Pass true for
default sharpening, or provide a numeric value for custom sharpening. See
Sharpen.
423 |
# File 'lib/imagekitio/models/transformation.rb', line 423 optional :sharpen, union: -> { Imagekitio::Transformation::Sharpen } |
#start_offset ⇒ Float, ...
Specifies the start offset (in seconds) for trimming videos, e.g., 5 or
10.5. Arithmetic expressions are also supported. See
Trim videos – Start offset.
431 |
# File 'lib/imagekitio/models/transformation.rb', line 431 optional :start_offset, union: -> { Imagekitio::Transformation::StartOffset }, api_name: :startOffset |
#streaming_resolutions ⇒ Array<Symbol, Imagekitio::Models::StreamingResolution>?
An array of resolutions for adaptive bitrate streaming, e.g., [240, 360,
480, 720, 1080]. See
Adaptive Bitrate Streaming.
439 440 441 |
# File 'lib/imagekitio/models/transformation.rb', line 439 optional :streaming_resolutions, -> { Imagekitio::Internal::Type::ArrayOf[enum: Imagekitio::StreamingResolution] }, api_name: :streamingResolutions |
#trim ⇒ Boolean, ...
Useful for images with a solid or nearly solid background and a central object. This parameter trims the background, leaving only the central object in the output image. See Trim edges.
450 |
# File 'lib/imagekitio/models/transformation.rb', line 450 optional :trim, union: -> { Imagekitio::Transformation::Trim } |
#unsharp_mask ⇒ Boolean, ...
Applies Unsharp Masking (USM), an image sharpening technique. Pass true for a
default unsharp mask, or provide a string for a custom unsharp mask. See
Unsharp Mask.
458 |
# File 'lib/imagekitio/models/transformation.rb', line 458 optional :unsharp_mask, union: -> { Imagekitio::Transformation::UnsharpMask }, api_name: :unsharpMask |
#video_codec ⇒ Symbol, ...
Specifies the video codec, e.g., h264, vp9, av1, or none. See
Video codec.
465 |
# File 'lib/imagekitio/models/transformation.rb', line 465 optional :video_codec, enum: -> { Imagekitio::Transformation::VideoCodec }, api_name: :videoCodec |
#width ⇒ Float, ...
475 |
# File 'lib/imagekitio/models/transformation.rb', line 475 optional :width, union: -> { Imagekitio::Transformation::Width } |
#x ⇒ Float, ...
Focus using cropped image coordinates - X coordinate. See Focus using cropped coordinates.
482 |
# File 'lib/imagekitio/models/transformation.rb', line 482 optional :x, union: -> { Imagekitio::Transformation::X } |
#x_center ⇒ Float, ...
Focus using cropped image coordinates - X center coordinate. See Focus using cropped coordinates.
489 |
# File 'lib/imagekitio/models/transformation.rb', line 489 optional :x_center, union: -> { Imagekitio::Transformation::XCenter }, api_name: :xCenter |
#y_ ⇒ Float, ...
Focus using cropped image coordinates - Y coordinate. See Focus using cropped coordinates.
496 |
# File 'lib/imagekitio/models/transformation.rb', line 496 optional :y_, union: -> { Imagekitio::Transformation::Y }, api_name: :y |
#y_center ⇒ Float, ...
Focus using cropped image coordinates - Y center coordinate. See Focus using cropped coordinates.
503 |
# File 'lib/imagekitio/models/transformation.rb', line 503 optional :y_center, union: -> { Imagekitio::Transformation::YCenter }, api_name: :yCenter |
#zoom ⇒ Float?
Accepts a numeric value that determines how much to zoom in or out of the cropped area. It should be used in conjunction with fo-face or fo-<object_name>. See Zoom.
511 |
# File 'lib/imagekitio/models/transformation.rb', line 511 optional :zoom, Float |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/imagekitio/models/transformation.rb', line 662
|
.variants ⇒ Array(Float, String)
|
|
# File 'lib/imagekitio/models/transformation.rb', line 649
|
Instance Method Details
#to_hash ⇒ {
407 |
# File 'sig/imagekitio/models/transformation.rbs', line 407
def to_hash: -> {
|