🔍

首页Home › 图片工具Image Tools

✂️ 去除图片边框留白(自动裁掉纯色 / 透明边)Unpad Image (Trim Borders & Padding)

自动裁掉图片四周的留白:纯色边框(白边、黑边或任意颜色)或透明边距,只保留中间的内容;可设容差应对 JPG 压缩噪点,可保留指定像素的边距,显示每一边裁掉了多少像素。支持批量,图片只在浏览器本地处理。Automatically trim the padding around an image — a solid-colour border (white, black or any colour) or transparent margins — keeping only the content in the middle. A tolerance copes with JPG noise, you can keep a margin of your choice, and it shows how many pixels were removed on each side. Works in bulk, and images are processed locally in your browser.

点击选择或拖放图片(可多选)Click or drop images here (multiple allowed)

使用说明与常见问题How-to & FAQ

「去除图片边框留白(自动裁掉纯色 / 透明边)」是什么?What is the Unpad Image (Trim Borders & Padding) tool?

自动裁掉图片四周的留白:纯色边框(白边、黑边或任意颜色)或透明边距,只保留中间的内容;可设容差应对 JPG 压缩噪点,可保留指定像素的边距,显示每一边裁掉了多少像素。支持批量,图片只在浏览器本地处理。Automatically trim the padding around an image — a solid-colour border (white, black or any colour) or transparent margins — keeping only the content in the middle. A tolerance copes with JPG noise, you can keep a margin of your choice, and it shows how many pixels were removed on each side. Works in bulk, and images are processed locally in your browser.

如何使用「去除图片边框留白(自动裁掉纯色 / 透明边)」?How do I use the Unpad Image (Trim Borders & Padding) tool?

在「去除图片边框留白(自动裁掉纯色 / 透明边)」中,选择或拖入文件,按需设置「边框类型」、「边框颜色」、「容差」、「保留边距 (px)」、「输出格式」等选项,然后点击每个结果旁的「下载」按钮即可;有多个文件时也可以点「全部下载(ZIP)」一次打包下载。In the Unpad Image (Trim Borders & Padding): Choose or drop your files, set "Border type", "Border colour", "Tolerance", "Keep margin (px)", "Format", then click the Download button next to each result (with several files, "Download all (ZIP)" saves them together).

“自动”是怎么判断边框颜色的?How does Auto pick the border colour?

自动模式看图片的四个角:大多数角相同的颜色就当作边框色;如果四角是透明的,就裁掉透明边。然后从四边向内逐行逐列检查,直到遇到与边框色不同的像素为止。边框不是纯色(例如有阴影或渐变)时,可以提高容差,或改用“指定颜色”。Auto looks at the four corners: the colour most of them share is taken as the border, and if the corners are transparent it trims transparent margins. It then works inwards from each edge, row by row and column by column, until it meets a pixel that differs from the border. If the border isn't a flat colour (a shadow or gradient, say), raise the tolerance or choose a colour yourself.

容差有什么用?What does the tolerance do?

JPG 等有损格式的白边往往不是纯白,而是 250、253 这样的近似值,容差允许每个颜色通道相差多少(0–100 对应 0–255)。容差为 0 时只裁掉完全相同的颜色;容差太大可能把浅色内容也当成边框裁掉。Borders in JPG and other lossy formats are rarely pure white — they're values like 250 or 253. The tolerance sets how far each colour channel may differ (0–100 maps to 0–255). At 0 only identical colours are trimmed; too high and pale parts of the content may be cut as well.

可以留一点边吗?Can I keep a little margin?

可以。“保留边距”会在内容四周保留指定像素的原有背景(不超过原图范围),适合裁掉多余白边但不想让内容贴边的情况。Yes. Keep margin leaves that many pixels of the original background around the content (never more than the image has), handy when you want to remove excess padding without the content touching the edges.

有哪些选项可以调整?What options can I adjust?

「去除图片边框留白(自动裁掉纯色 / 透明边)」的设置:「边框类型」可选 自动(按四角判断)、透明边、指定颜色(默认 自动(按四角判断));「边框颜色」默认 #ffffff;「容差」默认 10,范围 0–100;「保留边距 (px)」默认 0,范围 0–1000;「输出格式」可选 PNG、JPG、WebP(默认 PNG);「质量」默认 92,范围 40–100;可选文件:常见图片格式(含 HEIC、HEIF、AVIF、WEBP、BMP、JFIF)。改动任一选项后结果会按新设置重新生成。Settings in the Unpad Image (Trim Borders & Padding) — "Border type": Auto (from corners), Transparent, Colour (default Auto (from corners)); "Border colour" default #ffffff; "Tolerance" default 10, range 0–100; "Keep margin (px)" default 0, range 0–1000; "Format": PNG, JPG, WebP (default PNG); "Quality" default 92, range 40–100; files: common image formats (including HEIC, HEIF, AVIF, WEBP, BMP, JFIF). Changing any option regenerates the result with the new setting.

图片会被上传到服务器吗?Are my images uploaded?

不会。「去除图片边框留白(自动裁掉纯色 / 透明边)」使用浏览器 Canvas 在本地处理图片,处理后的文件直接从你的浏览器下载。No. The Unpad Image (Trim Borders & Padding) processes images locally with the browser Canvas API and the result downloads straight from your browser.

「去除图片边框留白(自动裁掉纯色 / 透明边)」免费吗?需要注册吗?Is the Unpad Image (Trim Borders & Padding) free? Do I need an account?

「去除图片边框留白(自动裁掉纯色 / 透明边)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Unpad Image (Trim Borders & Padding) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

▱ 图片倾斜变形(水平 / 垂直斜切)Skew Image (Horizontal & Vertical Shear)↔️ 图片平移(循环位移 / 偏移)Shift Image (Offset & Wrap Around)🔀 图片 RGB 通道重排(BGR / GBR 等互换)Reorder RGB Channels in an Image🎚️ 图片位深度转换(1 / 2 / 4 / 8 / 16 位 PNG)Convert Image Bit Depth (1, 2, 4, 8 or 16-bit PNG)👾 图片复古配色(Game Boy / NES / C64 / PICO-8 调色板)Convert Image to Retro Colours (Game Boy, NES, C64, PICO-8)🧪 图片颜色通道分离(R / G / B / Alpha)Separate Image Colour Channels (R, G, B, Alpha)🟩 绿幕抠图(去除绿色 / 蓝色背景)Remove Green Screen from Image🎞️ 图片滑动动画 GIF(滑入 / 滑出 / 循环滚动)Create Sliding Image Animation (GIF)🎞️ 滚动字幕 GIF 生成器(跑马灯文字动图)Create Marquee Text Image (Scrolling Text GIF)🌈 渐变图片生成器(线性 / 径向 / 角向,导出图片和 CSS)Generate Gradient Image (Linear, Radial, Conic + CSS)🔢 图片转 01 字符画(二进制文字艺术)Convert Image to Binary Art (0/1 Text Art)🔍 检查图片是不是 PNG(文件格式、损坏、APNG 检测)Check If Image Is PNG (Format, Corruption & APNG Check)

← 全部工具All tools