# Image Trim

Trim image borders by removing unwanted edges and margins automatically

> Canonical page: https://elysiatools.com/en/tools/image-trim

- **Category:** Design

- **Keywords:** image, trim, border, edges, margin, remove, crop, auto

## Overview

Image Trim is a professional utility designed to automatically detect and remove unwanted borders, margins, or empty space from your images, ensuring your visual content is perfectly framed.

## Inputs

- **Image File** (file): Upload any image file (JPEG, PNG, WebP, TIFF) for trimming
- **Trim Mode** (select): Choose what type of borders to trim from the image
- **Background Color** (color): Color to treat as background (for custom trim mode)
- **Trim Threshold** (range): Threshold for determining background pixels (1-255). Lower = more sensitive
- **Output Format** (select): Choose output format or keep original
- **Quality (1-100)** (number): Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

## When to use

- Removing excess white space from scanned documents or screenshots.
- Cleaning up transparent backgrounds around product photography.
- Standardizing image dimensions by stripping away inconsistent border widths.

## How it works

- Upload your image file (JPEG, PNG, WebP, or TIFF) to the tool.
- Select a trim mode, such as Auto-detect, Transparent, or specific color-based removal.
- Adjust the sensitivity threshold if necessary to fine-tune border detection.
- Download your perfectly cropped image in your preferred format and quality.

## Use cases

- Preparing e-commerce product images by removing distracting white margins.
- Cropping screenshots to focus only on the relevant application window.
- Batch-processing scanned documents to remove empty page borders.

## Frequently asked questions

### What file formats are supported?

You can upload JPEG, PNG, WebP, and TIFF files for processing.

### How does the 'Auto-detect' mode work?

The tool analyzes the pixel data at the edges of your image to identify and crop out uniform background areas.

### Can I remove custom-colored borders?

Yes, select the 'Custom color' mode and use the color picker to define the specific background shade you wish to remove.

### What does the 'Trim Threshold' setting do?

It controls the sensitivity of the detection. A lower value is more sensitive, helping to detect subtle variations in background colors.

### Will I lose image quality during the process?

If you choose to keep the original format, the image remains unchanged. If you convert to a lossy format like JPEG or WebP, you can adjust the quality slider to balance file size and visual clarity.

## Related tools

- [Remove Image Background](https://elysiatools.com/en/tools/image-background-remover): Remove image backgrounds and export a transparent PNG
- [Image Trim with Tolerance](https://elysiatools.com/en/tools/image-trim-tolerance): Advanced image trimming with configurable tolerance levels for precise border removal
- [Image Noise Reduction](https://elysiatools.com/en/tools/image-noise-reduction): Reduce image noise using multiple algorithms including median, gaussian, and bilateral filtering
- [Image Morphological Opening](https://elysiatools.com/en/tools/image-open): Apply morphological opening operation (erosion followed by dilation) to remove small noise and separate connected objects
- [Image Trim by Color](https://elysiatools.com/en/tools/image-trim-color): Remove specific colored borders and backgrounds from images by trimming pixels matching selected colors
- [Image Trim Whitespace](https://elysiatools.com/en/tools/image-trim-whitespace): Remove whitespace and empty margins from images by detecting and trimming blank areas
- [Median Pass Filter](https://elysiatools.com/en/tools/image-median-pass): Apply median pass filter to remove noise while preserving edges with multiple algorithms
- [Image Motion Blur Kernel](https://elysiatools.com/en/tools/image-motion-blur-kernel): Apply motion blur kernel to simulate camera movement or object motion in specified direction

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [Batch Image Standardization and Compression](https://elysiatools.com/en/hubs/batch-image-standardization-and-compression): Prepare a consistent image set by correcting orientation, removing unwanted margins, applying one size policy, compressing files, and checking representative outputs before delivery.
- [Image Cleanup, Resizing, and Detail Enhancement](https://elysiatools.com/en/hubs/image-cleanup-resize-and-detail-enhancement): Prepare reviewed images for delivery by fixing orientation, trimming edges, reducing noise, resizing precisely, and restoring crisp detail.
