What is trimming (auto-crop)?

Trimming, or auto-cropping, automatically removes empty or uniform borders from an image so the canvas shrinks to the bounding box of its visible content.

By · Updated

Want the full walkthrough? Read: How to trim transparent pixels in Photoshop →

Explained in more detail

Trimming finds where the real content of an image starts and stops, then crops everything outside that region. For transparent images, "empty" means transparent pixels. Some editors also trim by matching a solid color, such as a white border around a scan.

The steps are always the same: decide which pixels count as content, compute the bounding box of those pixels, and crop the canvas to that box. No resampling happens, so the pixels that remain are not altered at all. A trimmed image is the same picture on a smaller canvas.

Why do it? Design tools often export assets with a margin of transparent pixels, either from a fixed artboard or from a drop shadow that was later hidden. That margin makes logos look misaligned when placed next to text, wastes pixels, and in a PNG adds a little to the file size. Trimming gives you an asset whose edges are the actual edges of the artwork.

Trimming is the opposite of padding. Many workflows trim first to get a clean asset and then add back exactly the padding they want, for example to center a product on a square canvas.

Photoshop does this with Image, then Trim. Triim does it in the browser for single files or batches and downloads the result without uploading anything. Which pixels count as content is a setting that matters: Triim uses an alpha threshold of 10 out of 255, so faint, almost invisible pixels do not keep a border alive.

Related terms

Try it in Triim

Further reading

Part of the Triim image terms glossary, by Rocco Bombardieri.