Skip to content

Transformations

A transformation is the definition of an operation that can be performed on certain transformable files such as images. The following transformation types are supported.

Transformation type Description
Crop Crops an image starting in a specified coordinate (X,Y) such that no part of the image sticks out of an area of a specified height and width.
Resize Resizes an image to a specified height and width. If only one dimension is specified, the size of the other dimension is automatically calculated from the aspect ratio.
Canvas resize Fits an image into a canvas of a specified height and/or width (if only one dimension is specified, the other dimension in the canvas is unlimitted) and optionally enlarges the image to fill the canvas in case it's smaller than the canvas. The original aspect ratio is preserved.
Merge Merges a resource image into another image and places it in a specified horizontal position (left, center, right), vertical position (top, middle, bottom) and z-position (above, below) in the other image.
Change DPI Changes the DPI of a in image file making the file's print size larger or smaller.

Transformations can (in some cases) be chained together to form a series of transformations which are performed successively (in a fifo-manner).

The following shows in which situations the various transformation types are supported.

Permanent transformations

Scenario Scope Chaining Supported Transformation Types Description
Previews File No CanvasTransformation Each file has a preview attached to it. The preview is generated when the file is imported into DAM and it used as the thumbnail that represents the file in the UI.
File croppings File No CropTransformation Users can create file-specific croppings and these croppings can be requested specifically (in combination with predefined settings) when files are fetched.
Predefined settings System Yes All transformation types Users can create system-wide predefined settings and these predefined settings can be requested specifically (in combination with file croppings) when files are fetched.

Predefined settings can utilize transformations types and chain each type together to form a complex transformation.

Temporary transformations

Scenario Scope Chaining Supported Transformation Types Description
Custom transformations File No ResizeTransformation and CanvasTransformation The file fetch api allows callers to fetch files specifying a custom image size (results in a resize transformation) and custom canvas size (results in a canvas resize transformation). This results in file-specific custom transformations.

The timespan resulting in the absolute expiration time is configurable and ensures that custom transformations are cleaned up eventually.

The distinction between permanent and temporary transformations has relevance with regard to the caching jobs as it doesn't deal with temporary transformations when pre-heating and maintaining the cache. This means that custom transformations can't be precached. If this is not acceptable in terms of performance, use predefined settings instead which is the right way to achieve good performance during file fetching anyway.