Contain Image

Fit the whole image inside your chosen width and height without cropping or stretching it. If the proportions differ, the remaining space is filled with padding.

Input: Image file (Open file)Result: Image at the chosen dimensions; preview and download

or drop an image here

Text input

Run to see the result

Examples

Fit the complete image inside a 64 by 64 square. Compare this padding behaviour with Cover Image.

A checkerboard exposes flipped or softened edges

Input

A checkerboard exposes flipped or softened edges — original image

Result

Run to see the image

Expected: 64 × 64 px · dimensions checked

Width
64
Height
64
Horizontal align
Center
Vertical align
Middle
Resizing algorithm
Nearest Neighbour
Opaque background
On
A portrait frame shows cropping and padding

Input

A portrait frame shows cropping and padding — original image

Result

Run to see the image

Expected: 64 × 64 px · dimensions checked

Width
64
Height
64
Horizontal align
Center
Vertical align
Middle
Resizing algorithm
Nearest Neighbour
Opaque background
On
An RGB landscape separates the colour channels

Input

An RGB landscape separates the colour channels — original image

Result

Run to see the image

Expected: 64 × 64 px · dimensions checked

Width
64
Height
64
Horizontal align
Center
Vertical align
Middle
Resizing algorithm
Nearest Neighbour
Opaque background
On
A translucent badge tests alpha preservation

Input

A translucent badge tests alpha preservation — original image

Result

Run to see the image

Expected: 64 × 64 px · dimensions checked

Width
64
Height
64
Horizontal align
Center
Vertical align
Middle
Resizing algorithm
Nearest Neighbour
Opaque background
On
A pixel-art cross makes rotation visible

Input

A pixel-art cross makes rotation visible — original image

Result

Run to see the image

Expected: 64 × 64 px · dimensions checked

Width
64
Height
64
Horizontal align
Center
Vertical align
Middle
Resizing algorithm
Nearest Neighbour
Opaque background
On

Related tools

Browse multimedia tools