Resizing, cropping and padding

Resizing changes the pixel dimensions. Cropping removes part of the picture. Padding adds space around it. These operations solve different problems.

Crop or fit

The square crop cuts off the side labels and part of the sun. Fit keeps the whole picture and adds white space above and below.

Settings and measurements
FileDimensionsBytesExport settings
composition-3x2.png900 × 6007,461Optimize: True
composition-square-crop.png600 × 6005,156Optimize: True
composition-square-fit.png600 × 60016,283Optimize: True

Python 3.14.4, Pillow 13.0.0, Platform Linux, Webp 1.6.0, Jpeg 6.2, Avif 1.4.2

Goal Use
Make the same composition smaller Resize with the aspect ratio locked.
Fill a different shape Crop, then resize if needed.
Keep the whole picture in a different shape Fit the picture and add padding.

Check before saving

Compare the result with the original. Look for cut-off faces, stretched circles and missing labels. Save to a new file so you can change the choice later.

Related guides