resize()
Overview
public void function resize(
required string filePath
, numeric width = 0
, numeric height = 0
, string quality = "highPerformance"
, boolean maintainAspectRatio = false
, string focalPoint = ""
, struct cropHintArea
, struct fileProperties
)
Resizes an native image
Arguments
Name | Type | Required | Description |
---|---|---|---|
filePath | string | Yes | |
width | numeric | No (default=0) | New width, in pixels |
height | numeric | No (default=0) | New height, in pixels |
quality | string | No (default="highPerformance") | Resize algorithm quality. Options are: highestQuality, highQuality, mediumQuality, highestPerformance, highPerformance and mediumPerformance |
maintainAspectRatio | boolean | No (default=false) | Whether or not maintain the aspect ratio of the native image (if true, an autocrop may be applied if the aspect ratio of the resize differs from the source native image) |
focalPoint | string | No (default="") | Comma-separated list (x,y) defining coordinates of the image's focal point. When cropped, this point will be kept as close as possible to the centre of the resulting image. |
cropHintArea | struct | No | Struct (x,y,width,height) defining a crop hint area of the image. Image will be cropped to this area before resizing. |
fileProperties | struct | No |