Image Operations / Scaling
Image scaling empowers you to adjust the dimensions of your images based on a specified scale factor. Unlike image resizing, which requires exact dimensions, image scaling utilizes a floating-point size
parameter to proportionally transform the image. For instance, to reduce the size of your images by 50%, you would specify a size
value of 0.5
.
By default, image scaling maintains the aspect ratio of the images, ensuring they retain their original proportions. However, you have the flexibility to adjust this behavior by specifying a custom aspect ratio
parameter. The aspect ratio value represents the height divided by the width. The default ratio value is 1.0
.
{
"scale": {
"size": 0.5,
"ratio": 1.0
}
}