Scale image🔗
Scales an image.
Inputs🔗
image
: Input image.scalingMode
: The way the image is scaled.scalingFactor
: A scalar scaling factor. Depending on scaling mode, either scalingFactor or size will be used.size
: The target size in pixels. In modes that make use of aspect ratio, the width/height ratio defines the target aspect ratio.backgroundColor
: The color to use for undefined pixels in the output.
Outputs🔗
image
: Output image.
-
enum
ScalingMode
🔗 Scaling modes.
Values:
-
enumerator
ScaleByFactor
🔗 Scale both dimensions according to the scaling factor.
Retains original aspect ratio.
-
enumerator
StretchHorizontally
🔗 Stretch horizontally according to the scaling factor.
-
enumerator
StretchVertically
🔗 Stretch vertically according to the scaling factor.
-
enumerator
StretchToSize
🔗 Scale to specified size, ignoring original aspect ratio.
-
enumerator
StretchToAspectRatioX
🔗 Stretch the image horizontally to obtain a wanted aspect ratio.
-
enumerator
StretchToAspectRatioY
🔗 Stretch the image vertically to obtain a wanted aspect ratio.
-
enumerator
ScaleDownToAspectRatio
🔗 Stretch the image to specified aspect ratio so that result is not bigger than the original image.
-
enumerator
ScaleUpToAspectRatio
🔗 Stretch the image to specified aspect ratio so that result is not smaller than the original image.
-
enumerator
ScaleToFitSize
🔗 Scale either up or down so that the size of the result is the same as the specified size in one dimension and not larger in the other.
-
enumerator
ScaleToFillSize
🔗 Scale either up or down so that the size of the result is the same as the specified size in one dimension and not smaller in the other.
-
enumerator
ScaleToPixelCount
🔗 Scale the image so that the number of pixels in it is close to the number of pixels in an image with the specified size while retaining original aspect ratio.
-
enumerator
ScaleToFixedSize
🔗 Scale either up or down so that the scaled image fills the area of the output image at least in one dimension.
The size of the output image is always as set by
size
. If the aspect ratio of the input image is not identical to the aspect ratio of the output image, the unused part of the output image is left black.
-
enumerator