Links

Image enhancement & color manipulation

Image enhancement

Contrast stretch - (e-contrast)

It is used to automatically enhance the contrast of the image by using the full intensity values that particular image format allows. This means that the lighter sections of an image become even lighter and the darker sections becomes even brighter, thereby enhancing the contrast.

Sharpen - (e-sharpen)

It is used to sharpen the input image. It is useful when highlighting the edges and finer details within an image.
Example usage - e-sharpen-<number>
If just the e-sharpen parameter is used, then a default sharpening is performed on the input image. The default behaviour can be controlled by specifying a number that restricts the extent of sharpening performed.

Unsharp mask - (e-usm)

Unsharp Masking (USM) is an image sharpening technique. This transform allows you to apply and control unsharp masks on your images.
Example usage - e-usm-<radius>-<sigma>-<amount>-<threshold>
The amount of sharpening can be varied using 4 parameters - radius , sigma , amount , and threshold. This results in perceptually better images compared to using e-sharpen. Only positive floating points are allowed for these 4 parameters.

Shadow - (e-shadow)

This feature adds a shadow under solid objects in an input image with a transparent background.
The shadow is applied under the areas constituted by the non-transparent pixels in the input image. You can adjust the shadow's saturation, blur level, and positional offsets with the following parameters.
Parameter
Description
Range
Default value
Blur (bl)
Adjusts the blur level of the shadow. e.g. e-shadow-bl-15
0 to 15
10
Saturation (st)
Specifies the saturation level of the shadow. e.g. e-shadow-st-40
0 to 100
30
X Offset (x)
Sets the horizontal offset of the shadow by x% of the image width. e.g. e-shadow-x-10. Supports negative values by prefixing N: e.g. e-shadow-x-N10
0 to 100 or N100
2
Y Offset (y)
Sets the vertical offset of the shadow by y% of the image height. e.g. e-shadow-y-10. Supports negative values by prefixing N: e.g. e-shadow-y-N10
0 to 100 or N100
2
Multiple parameters can be configured by appending them with an underscore (_). They will be applied independent of the order in which they are specified.
Example usage - e-shadow-<blur>_<saturation>_<x-offset>_<y-offset>, which would look like, e-shadow-bl-15_st-40_x-10_y-N5.

Limits

Shadows can only be applied to images with a resolution of maximum 2MP. Images with resolutions outside this limit will return a "400 - Bad Request" error.
To enable shadows on images larger than 2MP, you can resize the images either in the same chain or a chained transformation.
e.g. For a 3MP image, e-shadow would not work. But w-500,e-shadow or w-500:e-shadow would work.
We have an input image with dimensions 2216x1500 (3MP). Applying only the shadow transformation will return an error with status code 400: https://ik.imagekit.io/demo/tr:e-shadow/lipstick_2M.png.
Resize the image as follows to apply a shadow successfully:
Resize and shadow: w-500,e-shadow
Chained resize then shadow: w-500:e-shadow
Original 3MP image (2216x1500)