ImageTransformation

View as Markdown

ImageTransformation

ImageTransformation provides Query on image URL

brightness

The brightness parameter allows you to increase or decrease the intensity with which an image reflects or radiates perceived ligh.

NameTypeDescription
brightness (required)int

you can also define brightness using any decimal number

import contentstack;


final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");

final imageTransformation = stack.imageTransform(imageUrl).brightness(3)

blur

The blur parameter allows you to decrease the focus and clarity of a given image. To specify the extent to which you need to increase the blurriness of an image, use any decimal number (float) between 1 and 1000.

NameTypeDescription
blur (required)int

It can accept hexadecimal, combination of (Red, Blue, Green) and (Red, Blue, Green, Alpha)

import contentstack;


final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");

final imageTransformation = stack.imageTransform(imageUrl).bgBolor('Red')

bgColor

he bg-color function lets you set a backgroud color for the given image. This is useful when applying padding or for replacing the transparent pixels of an image..

NameTypeDescription
bgColorString

It can accept hexadecimal, combination of (Red, Blue, Green) and (Red, Blue, Green, Alpha)

import contentstack;


final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");

final imageTransformation = stack.imageTransform(imageUrl).bgBolor('Red')

auto

Specify the version number of the asset that you wish to retrieve. If the version is not specified, the details of the latest version will be retrieved.

NameTypeDescription
autoString

auto parameter is set to webp

formatString

The format

import contentstack;


final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");

final imageTransformation = stack.imageTransform(imageUrl).auto(auto: 'webp', format: 'pjpg')