shrinkToFit()

Overview

public void function shrinkToFit(
      required string  filePath      
    , required numeric width         
    , required numeric height        
    ,          string  quality        = "highPerformance"
    ,          string  paddingColour  = ""
    ,          struct  fileProperties
)

Shrinks an native image to fit within a given width and height, without changing the native images aspect ratio.

Arguments

NameTypeRequiredDescription
filePathstringYes
widthnumericYesMaximum width for the native image, in pixels
heightnumericYesMaximum height for the native image, in pixels
qualitystringNo (default="highPerformance")Resize algorithm quality. Options are: highestQuality, highQuality, mediumQuality, highestPerformance, highPerformance and mediumPerformance
paddingColourstringNo (default="")
filePropertiesstructNo