Loading
Loading tool
The tool is loaded only when you open it.
All processing for this tool happens in your browser. Your input is not sent to a server.
About this tool
Detect transparent or near-white borders, inspect crop bounds and export a local PNG with retained padding.
Common uses
- Trim transparent margins around a raster icon.
- Remove near-white scan margins while reviewing preserved content.
How to use it
- 1.Choose a local raster image or load the authored 64×48 example.
- 2.Select transparent or near-white background, integer tolerance and padding, then detect bounds.
- 3.Inspect the red rectangle and coordinates on the unchanged original. Generate and review the cropped PNG, then download.
Executable local examples
PNG 32×20
Authored 64×48 transparent bitmap; opaque blue rectangle x=16, y=14, width=32, height=20; transparent mode, tolerance 0, padding 0.
Bounds x=16, y=14, width=32, height=20. PNG crop: 32×20.
PNG 40×28
The same bitmap; transparent mode, tolerance 0, padding 4.
Bounds x=12, y=10, width=40, height=28. PNG crop: 40×28.
Limits and notes
- PNG/JPEG/WebP/GIF/BMP; 10 MiB input, 4096 pixels per edge, 8 million pixels. PNG output up to 20 MiB. Each asynchronous phase has a 30-second deadline. Animated inputs use the browser-decoded static frame.
- Transparent mode treats alpha ≤ tolerance as background, regardless of RGB. White mode composites each channel over white and treats pixels as background only when every channel is at least 255 − tolerance. No rounding is used for threshold comparison.
- The bounding rectangle contains every non-background pixel, including isolated noise. Padding expands it within the original bounds. All-background input produces no crop. No rotation or deskew is performed.
- The original stays available for comparison. Output is a browser-decoded PNG with the detected pixel dimensions; metadata, animation and original encoded bytes are not preserved. Native decode and canvas allocation may still consume memory before rejection.
- File, mode, tolerance, padding or language changes, clear, cancel and navigation invalidate old bounds and downloads. This tool uses local files with no upload, persistent storage or external model.
Frequently asked questions
Can tolerance remove real content?
Yes. Low-alpha edges or pale details can match the background. Review the original with the red bounds before generating and downloading the crop.
What happens to an all-blank image?
There is no foreground bounding box. The tool reports a blank result and disables crop export; lower tolerance or change mode.
Does it rotate or remove internal white areas?
No. It only trims outside the axis-aligned bounding box. Noise can enlarge the bounds, rotated content keeps its current orientation, and internal pixels remain.