FlowPocket
Tools › Image tools › Auto-Trim Image Margins

📐Auto-Trim Image Margins

Detects the color at an image's corners and trims away the matching margin from all four sides. Batch processing supported — no AI, just color comparison.

Your images are never sent to a server (processed in your browser)

Choose images (multiple allowed)
Detection strictness 10%
Margin to keep 8px

How to use

  1. Choose the images you want to trim (multiple allowed).
  2. Adjust "Detection strictness" and "Margin to keep" if needed (the defaults usually work well).
  3. Press "Auto-detect & trim margins" — each image's corner color is treated as the background to crop away.
  4. Save results individually, or press "Download all as ZIP" for the whole batch.

How it scans inward from the edges

This tool first samples the color at an image's four corners to guess the background color. It then scans inward — row by row from the top and bottom, column by column from the left and right — until it finds content that differs meaningfully from that background, and crops there. It isn't recognizing objects; it's purely comparing colors.

Raising "Detection strictness" makes it more tolerant of subtle background variation (like a faint shadow), but too high a setting can end up trimming pale content you wanted to keep. Adjust while checking the result.

Handy for

FAQ

Are my images uploaded to a server?
No. Detection, cropping, and saving all happen entirely in your browser.
Does it work on backgrounds that aren't solid?
It's designed for images whose corners are a single (or near-uniform) color. Photos where the subject reaches into the corners may get cropped in unintended ways.
Too much or too little gets trimmed.
Adjust "Detection strictness" — lower it if too much is being cut, raise it if margin is being left behind.
Can I process images with different background colors together?
Yes. Each image's corner color is detected independently, so a mixed batch works fine.

Related tools