new StyleTransfer( imageSource )

Description

The Image Source used to create the style transfer, Use the Image Source builder to quickly create a source:
Import: import Sources from '@cloudinary/url-gen/qualifiers/sources';
Create: Source.image('dog')

Parameters
Name Type Description
imageSource ImageSource
Details

Visit Effect for an example

Methods


getActionTag() → {string}

Description

Returns the custom name tag that was given to this action

Returns

strength( [ effectStrength ] ) → {this}

Description

Determines the strength in which the styleTransfer is applied.

Parameters
Name Type Attributes Default Description
effectStrength number <optional>

The strength level, 1-100, default: 100

Returns

setActionTag() → {this}

Description

Sets the custom name tag for this action

Returns

preserveColor( bool ) → {this}

Description

More aggressively preserves the colors of the the target photo, Can be used with strength() to enhance this behaviour

Parameters
Name Type Default Description
bool boolean true
Returns

toString() → {string}

Description

The build phase of the Action, used internally to concat all the options received into a single string. The result of this method is the toString() of the imageLayer provided in the constructor.

Returns

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