🔍

首页Home › 图片工具Image Tools

🔲 去除位图边框(自动裁掉 BMP 四周的纯色边)Remove a Bitmap Border

自动去掉位图(BMP)或其他图片四周的纯色边框或留白:以左上角像素的颜色为边框色(也可以自己指定颜色),按容差从四边向内找到第一行/列不同的像素并裁掉外面的部分,透明边框同样可以去除;也可以手动指定上、右、下、左各裁掉多少像素。会显示每一边去掉了多少像素。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Automatically remove a solid-colour border or margin around a bitmap (BMP) or any other image. The colour of the top-left pixel is taken as the border colour (or pick your own), and from each edge inwards the first row or column that differs by more than the tolerance is found and everything outside it is cut away; transparent borders are removed too. Or enter exactly how many pixels to cut from the top, right, bottom and left. The tool shows how much was removed from each side. The result is a 24-bit BMP by default, or PNG; works in bulk, and images are processed locally in your browser.

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

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

「去除位图边框(自动裁掉 BMP 四周的纯色边)」是什么?What is the Remove a Bitmap Border tool?

自动去掉位图(BMP)或其他图片四周的纯色边框或留白:以左上角像素的颜色为边框色(也可以自己指定颜色),按容差从四边向内找到第一行/列不同的像素并裁掉外面的部分,透明边框同样可以去除;也可以手动指定上、右、下、左各裁掉多少像素。会显示每一边去掉了多少像素。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Automatically remove a solid-colour border or margin around a bitmap (BMP) or any other image. The colour of the top-left pixel is taken as the border colour (or pick your own), and from each edge inwards the first row or column that differs by more than the tolerance is found and everything outside it is cut away; transparent borders are removed too. Or enter exactly how many pixels to cut from the top, right, bottom and left. The tool shows how much was removed from each side. The result is a 24-bit BMP by default, or PNG; works in bulk, and images are processed locally in your browser.

如何使用「去除位图边框(自动裁掉 BMP 四周的纯色边)」?How do I use the Remove a Bitmap Border tool?

在「去除位图边框(自动裁掉 BMP 四周的纯色边)」中,选择或拖入文件,按需设置「方式」、「边框颜色」、「容差」、「上」、「右」等选项,然后点击每个结果旁的「下载」按钮即可;有多个文件时也可以点「全部下载(ZIP)」一次打包下载。In the Remove a Bitmap Border: Choose or drop your files, set "Mode", "Border colour", "Tolerance", "Top", "Right", then click the Download button next to each result (with several files, "Download all (ZIP)" saves them together).

自动检测是怎么判断边框的?How does auto-detect find the border?

以左上角像素的颜色作为边框色,从上、下、左、右四边分别向内逐行逐列检查:只要一整行(或一整列)的像素都和边框色相差不超过容差,就算作边框并去掉,直到遇到第一行/列有不同颜色的像素为止。JPG 等有损图片的白边常常不是纯白,把容差调到 5%–10% 即可;如果左上角本身就是图片内容,请改用“指定边框颜色”。左上角是透明像素时会去掉四周的透明区域。The top-left pixel's colour is taken as the border colour, and from each of the four edges the tool checks row by row and column by column: any full row (or column) whose pixels are all within the tolerance of that colour counts as border and is removed, stopping at the first row or column containing a different pixel. White margins in lossy JPGs are rarely pure white, so 5%–10% tolerance usually works; if the top-left corner is part of the picture, use Chosen colour instead. A transparent top-left pixel removes the transparent area around the image.

会不会把图片内容也裁掉?Could it cut into the picture?

只有整行或整列都是边框色才会被去掉,图片内部和边框颜色相同的区域不受影响。如果整张图都是同一种颜色,工具会保持原样并提示。需要精确控制时可以用“固定像素数”分别指定四边各去掉多少像素。Only rows or columns that are entirely border-coloured are removed, so areas inside the picture that happen to match the border are not touched. If the whole image is one colour it is left unchanged with a note. For exact control, use Fixed pixels and set how many pixels to remove from each side.

导出的 BMP 是什么格式?What kind of BMP is produced?

默认导出 24 位不压缩 BMP(BITMAPINFOHEADER,自下而上存储),Windows 画图、Photoshop、GIMP、Python Pillow 和各种嵌入式工具都能直接打开。BMP 不支持透明,透明部分会填成白色并在结果里提示;需要保留透明请导出 PNG。By default a 24-bit uncompressed BMP (BITMAPINFOHEADER, stored bottom-up), which Windows Paint, Photoshop, GIMP, Python Pillow and embedded tools open directly. BMP has no transparency, so transparent areas are filled with white (the result says so); export PNG to keep transparency.

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

「去除位图边框(自动裁掉 BMP 四周的纯色边)」的设置:「方式」可选 自动检测(左上角颜色)、指定边框颜色、固定像素数(默认 自动检测(左上角颜色));「边框颜色」默认 #ffffff;「容差」默认 5,范围 0–100;「上」默认 0;「右」默认 0;「下」默认 0;「左」默认 0;「输出格式」可选 BMP、PNG(默认 BMP);可选文件:常见图片格式(含 HEIC、HEIF、AVIF、WEBP、BMP、JFIF)。改动任一选项后结果会按新设置重新生成。Settings in the Remove a Bitmap Border — "Mode": Auto (top-left colour), Chosen colour, Fixed pixels (default Auto (top-left colour)); "Border colour" default #ffffff; "Tolerance" default 5, range 0–100; "Top" default 0; "Right" default 0; "Bottom" default 0; "Left" default 0; "Format": BMP, PNG (default BMP); 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?

不会。「去除位图边框(自动裁掉 BMP 四周的纯色边)」使用浏览器 Canvas 在本地处理图片,处理后的文件直接从你的浏览器下载。No. The Remove a Bitmap Border processes images locally with the browser Canvas API and the result downloads straight from your browser.

「去除位图边框(自动裁掉 BMP 四周的纯色边)」免费吗?需要注册吗?Is the Remove a Bitmap Border free? Do I need an account?

「去除位图边框(自动裁掉 BMP 四周的纯色边)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Remove a Bitmap Border 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

✂️ 去除图片边框留白(自动裁掉纯色 / 透明边)Unpad Image (Trim Borders & Padding)✂️ 位图裁剪(按像素或百分比裁剪 BMP)Crop a Bitmap🖼️ 图片加边框Add Border to Image📐 位图缩放(调整 BMP 尺寸)Resize a Bitmap🔃 位图旋转(BMP 旋转 90° / 180° / 任意角度)Rotate a Bitmap🧪 位图分色(拆分 BMP 的红、绿、蓝通道)Separate Bitmap Colours✨ 位图锐化(BMP 反锐化掩模 / 拉普拉斯)Sharpen a Bitmap🎨 提取位图调色板(BMP 主色 / 色值列表)Extract a Bitmap Colour Palette🔠 十六进制转位图(HEX / C 数组 → BMP)Convert Hex to Bitmap🖌️ RGB 数值转位图(把颜色值画成 BMP)Convert RGB Values to Bitmap🔤 符号转位图(ASCII / Braille 画 → BMP)Convert Symbols to a Bitmap🎲 随机位图生成器(噪点 / 色块 BMP)Draw a Random BMP

← 全部工具All tools