Skip to main content

Extend an image

Extend transformation allows users to extends/pads the edges of the image with the provided background colour. This operation will always occur after resizing and extraction, if any. It is generally recommended to start with a high-quality image with a high resolution to avoid loss of image quality when extending the image.


Params

Top (t), Left (l), Bottom (b), Right (r)

The range for the top, right, bottom, and left parameters is from 0 to 500, with 10 as the default value. The default background color applied is black.

Background (bc)

The background colour for the padded area.

Uses hex value to determine the background color. The default background color is black.

The image is resized to 300x200px and then extended. This adds 10px padding to all the sides with background color as black.

Border Type (bt)

This parameter decides how to fill the extra space created by the pad parameters.

  • constant (default) - Fills extra space with the solid color specified by the parameter background. If background is not specified then the access space will be filled with the default black color.

  • replicate - Fills extra space by replicating the nearest pixels at the border of the original image.

  • reflect - Fills extra space by reflecting the image from the sides.

  • wrap - Fills extra space by wrapping the image at the opposite end of the side.

DPR (dpr)

Device Pixel Ratio (DPR) refers to the ratio between physical pixels on a device's screen and logical pixels that are used to define the size and position of elements on a web page. In the context of blurring an image, DPR is not directly related to the blurring process itself, but it may affect how the blurred image is displayed on different devices.

The default dpr value is 1. The minimum value users can set is 0.1 and the maximum is 5. The desired output is obtained by multiplying the dpr value with the selected input parameter values. For instance, suppose the user selects the top and left input parameters. In such a situation, the output will be produced by multiplying the dpr value by the top and left values. Depending on the chosen input parameters and the dpr value, different outputs will be produced.

For instance, when using (top=30, left=20, dpr=3), the output will be 1800 (30 x 20 x 3 = 1800). Similarly, (top=50, left=50, bottom=50, right=50, dpr=3) will result in an output of 18750000 (50 x 50 x 50 x 50 x 3 = 18750000).

Transform and enhance your images using our powerful AI technology. Organize your images in more efficient manner and our extensible APIs enables seamless integration with your system unleashing the power of our platform. Join the large community of users who use PixelBin to transform their image libraries and achieve excellent performance

Is this page useful?