Transformations are tools for modifying images. You can include many transformations in a policy. Transformations can be any of these specialized object types:

AppendSpecifies an image or text to affix beside the image you're transforming, also referred to as the source image. The API places the appended image on a major dimension, then aligns the image on the minor dimension. When you append to a source image, there might be an area created that's not covered by either image. Transparent pixels fill this area.
BackgroundColorPlaces a transparent image on a set background color. Color is specified in the typical CSS hexadecimal format.
BlurApplies a Gaussian blur to the image.
CompositeApplies another image to the source image, either as an overlay or an underlay. The image that's underneath is visible in areas that are beyond the edges of the top image or that are less than 100% opaque. A common use of an overlay composite is to add a watermark.
CompoundAn ordered combination of transformations to perform. Use to represent a sequence of transformations as a single transformation.
ContrastAdjusts both the contrast and brightness of an image.
CropCuts the image down to an area you specify. Use this transformation to describe the size and position of a box indicating the portion of the image to preserve.
FaceCropDetects faces in an image, then crops them to position the faces in the center of the image.
FeatureCropIdentifies prominent features of an image such as strong corners, then crops around those features.
FitAndFillUses aspect fitting to resize an image to the exact dimensions specified. This transformation then uses aspect fill on any remaining areas of the image.
GoopDistorts an image. For example, think of your image printed on a rubber sheet of paper with a grid of pins, also referred to as control points, in the rubber. Goop shifts the pins a random distance in a random direction, distorting the image on the rubber. The results look like a goopy version of the image. You can use this to create non-deterministic watermarks for security purposes.
GrayscaleRenders the image in shades of black, white, and gray.
HSLAdjusts the hue, saturation, and lightness (HSL) of an image. Hue is the number of degrees that colors rotate around the color wheel. Saturation is a multiplier to increase or decrease color saturation. Lightness is a multiplier to increase or decrease the lightness of an image. Other transformations can also affect color, such as Grayscale and Max Colors. If you're using more than one, consider the order to apply them for the desired results.
HSVIdentical to HSL except it replaces lightness with value. For example, if you reduce the lightness of a light green, almost white, image, the color turns a vibrant green. Reducing the value, turns the image a darker color, close to gray. This is because the original image color is very close to white.
MaxColorsSets the maximum number of color in the image's palette. Reducing the number of colors in an image can help reduce file size.
MirrorFlips an image horizontally, vertically, or both.
OpacityChanges the opacity of an image. Use this transformation to make an image more transparent. Values below 1.0 increase transparency; 0.0 is invisible. For images that have some transparency, values above 1.0 increase the opacity of the transparent portions.
RegionOfInterestCropCrops to a region around a specified area of interest.
RelativeCropShrinks or expands the four sides of an image relative to its current dimensions. Transparent pixels fill this expanded area.
ResizeResizes an image to a particular, absolute dimension. If you don't enter a width or a height, the image is resized with the fit aspect preservation mode, which selects a value for the missing dimension that preserves the image's aspect.
RotateRotates the image around its center by indicating the degrees of rotation. Positive values rotate clockwise and negative values rotate counter-clockwise.
ScaleChanges the image size relative to the starting size, expressed as a percentage of the width and height. You can scale width and height independently.
ShearSlants an image into a parallelogram, as a percent of starting dimension as represented in decimal format. You need to specify at least one axis property. Transparent pixels fill empty areas around the sheared image as needed. It's useful to use backgroundColor transformation for these areas.
Smart CropIntelligently crops and resizes images around prominent faces and features.
TrimAutomatically crops uniform backgrounds from the edges of an image.
UnsharpMaskEmphasizes edges and details in source images without distorting the colors. Although this effect is often referred to as sharpening an image, it actually creates a blurred, inverted copy of the image, or unsharp mask. Image and Video Manager combines the unsharp mask with the source image to create a clearer image.

These transformations operate conditionally based on qualities of the source image:

IfDimensionChooses a transformation depending on the dimensions of the source image. You need to select a dimension for comparison, which is either width and height or both.
IfOrientationChooses a transformation depending on the orientation of the source image.

Several transformations may specify these types of images:

BoxImageTypeA rectangular box, with a specified color and applied transformation.
TextImageTypeA snippet of text. Defines font family and size, fill color, and outline stroke width and color.
UrlImageTypeAn image loaded from a URL.

Several transformations may specify these types of shapes:

CircleShapeTypeDefines a circle with a specified radius from its center point.
PointShapeTypeDefines coordinates for a single point, to help define polygons and rectangles. Each point may be an object with x and y members, or a two-element array.
PolygonShapeTypeDefines a polygon from a series of connected points.
RectangleShapeTypeDefines a rectangle's width and height relative to an anchor point.
UnionShapeTypeIdentifies a combined shape based on a set of other shapes. You can use a full JSON object to represent a union or an array of shapes that describe it.

Many of these object types also allow you to specify a Variable object as an alternative to a string, number, or boolean value. These correspond to the name of any variable defined within the policy, and optionally passed in as image URL query parameters.