new ResizeSimpleAction( cropType, cropWidth, cropHeight )

Description

Defines a resize using width and height.

Parameters
Name Type Description
cropType string
cropWidth number | string

The required width of a transformed asset.

cropHeight number | string

The required height of a transformed asset.

Details

Visit Resize for examples

Methods


getActionTag() → {string}

Description

Returns the custom name tag that was given to this action

Returns

setActionTag() → {this}

Description

Sets the custom name tag for this action

Returns

toString() → {string}

Description

Calls toString() on all child qualifiers (implicitly by using .join()).

Returns
Details

addQualifier( qualifier ) → {this}

Description

Adds the parameter to the action.

Parameters
Name Type Description
qualifier SDK.Qualifier
Returns

addFlag( flag ) → {this}

Description

Adds a flag to the current action.

Parameters
Name Type Description
flag Qualifiers.Flag
Returns
Details

height( x )

Description

Sets the height of the resize

Parameters
Name Type Description
x string | number

The height in pixels (if an integer is specified) or as a percentage (if a float is specified).


width( x )

Description

Sets the width of the resize

Parameters
Name Type Description
x string | number

The width in pixels (if an integer is specified) or as a percentage (if a float is specified).


aspectRatio( ratio ) → {this}

Description

Sets the aspect ratio of the asset. For a list of supported types see AspectRatio values

Parameters
Name Type Description
ratio AspectRatioType | number | string

The new aspect ratio, specified as a percentage or ratio.

Returns

relative() → {this}

Description

Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.

Returns

regionRelative() → {this}

Description

Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region

Returns