PNG Trim Borders
Auto-trim PNG transparent borders with threshold, margin, batch
PNG Trim Borders is a free online Image tool. Auto-trim PNG transparent borders with threshold, margin, batch Related terms: 透明 · trim · autocrop · auto-trim · 裁掉透明 · 去白边. Use it on this page without signing in.
alpha 低于此值视为透明。调高可裁掉半透明毛边
裁剪后四周保留的像素
工作原理
扫描每个像素的 alpha 通道,找到非透明内容的边界框(类似 Photoshop 的「裁剪并修整」/ ImageMagick 的 -trim), 然后用 canvas 裁剪导出。所有计算在浏览器本地完成,图片不会上传到服务器。
适用场景:设计稿导出多余的透明留白、切图素材去白边、UI 图标标准化、批量处理游戏 sprite 等。
使用说明
- 拖入一张或多张 PNG / WebP 图片(支持批量多选)
- 调整参数:透明阈值(alpha 低于此值视为透明)、边距(裁剪后四周保留的像素)、输出格式
- 点击「裁剪全部」,逐张自动扫描非透明内容边界并裁剪
- 单张点「下载」,或点「下载 ZIP」打包下载所有结果
常见问题
- 整图透明怎么办? 工具会提示「整图透明,无可裁内容」,跳过该图
- 边缘有半透明毛边? 调高「透明阈值」(如 10-30),可把抗锯齿残留的半透明像素一并裁掉
- 数据会上传吗? 不会,所有像素扫描与裁剪在浏览器本地完成
- 支持 JPG 吗? JPG 无 alpha 通道,整张都是不透明的,本工具主要面向带透明背景的 PNG / WebP
原理
逐像素扫描 alpha 通道,记录非透明内容的最小/最大 x/y 坐标得到边界框(类似 Photoshop「裁剪并修整」、ImageMagick -trim),再按边距外扩后用 canvas 裁剪导出。
More Image
View allImage Compressor
Compress JPG / PNG / WebP, custom quality and dimensions
Image Converter
Convert between JPG / PNG / WebP, HEIC to JPG
Crop Rotate Flip
Crop, rotate and flip images with custom ratios
ID Photo Background
Change ID photo background (blue/white/red), common sizes
Image Watermark
Add text watermarks with custom position, size and opacity
Nine-Grid Split
Split an image into a 3×3 grid for social posts
Image Stitch
Stitch multiple images vertically or horizontally
GIF Maker
Create GIFs from images, adjust frame rate and size
FAQ about PNG Trim Borders
What can PNG Trim Borders do?
PNG Trim Borders is a Image tool. Auto-trim PNG transparent borders with threshold, margin, batch You can finish the job on this page.
Who should use PNG Trim Borders?
Anyone handling 透明 · trim · autocrop · auto-trim · 裁掉透明 · 去白边 who does not want to install desktop software can use PNG Trim Borders in the browser.
Is PNG Trim Borders safe? Is my data uploaded?
This tool runs in your browser. We do not collect the content you enter into PNG Trim Borders just because you used it.
What similar tools exist?
Related tools in the same Image group are listed at the bottom of this page.