Chaining Transformations

With the transformation engine you can combine a number of conversion tasks in a variety of ways to produce different results. In the following examples we will take an image and transform it using multiple conversions in different orders to demonstrate how the order and transformation type matter when combining tranformation tasks.

Now in this example the faces of the police officers are somewhat obscured, so only two faces are detected (the second and fourth officers from the left). We select the first face object, which happens to be the second officer.

The image we generated is a bit small though. Let's blow it up in size using a few different methods. There are many ways to achieve similar or identical results when using Filestack's transformations.

Resizing using the crop_faces task crop_faces=faces:1,buffer:200,w:300/circle:

The reason these two conversions don't produce the same image is because the first resizes the face object to 300x224 pixels. Then the circle effect is applied which creates an image that is 226x224. The other transformation crops the officer's face and applies the circle effect, and then resizes the final image to 300 pixels wide, which results in a 300x300 image.

Now let's rotate his face just for fun crop_faces=faces:1,buffer:200/circle/resize=w:300/rotate=deg:270:

By chaining transformation tasks together, you can build complicated effects and images. Note that the more transformations you string together the longer it will take to process and generate the transformed image.