✂️ 位图裁剪(按像素或百分比裁剪 BMP)Crop a Bitmap
按精确的像素坐标或百分比裁剪位图(BMP)或其他图片:填写左上角位置和裁剪宽高(留空表示到右边/底边为止),也可以从中心裁剪成指定尺寸,裁剪框超出图片时会自动收到图片范围内并提示。像素逐个复制、不重新采样,适合截取精灵图、图标和单片机屏幕素材。默认导出 24 位 BMP,也可以导出 PNG,支持批量(每张按同样的设置裁剪),图片只在浏览器本地处理。Crop a bitmap (BMP) or any other image by exact pixel coordinates or percentages: enter the top-left position and the crop width and height (blank means up to the right or bottom edge), or crop a given size from the centre. A crop box that runs past the image is clipped to it, with a note. Pixels are copied one for one with no resampling — ideal for cutting sprites, icons and microcontroller-screen assets. The result is a 24-bit BMP by default, or PNG; works in bulk (every image is cropped the same way), and images are processed locally in your browser.
使用说明与常见问题How-to & FAQ
「位图裁剪(按像素或百分比裁剪 BMP)」是什么?What is the Crop a Bitmap tool?
按精确的像素坐标或百分比裁剪位图(BMP)或其他图片:填写左上角位置和裁剪宽高(留空表示到右边/底边为止),也可以从中心裁剪成指定尺寸,裁剪框超出图片时会自动收到图片范围内并提示。像素逐个复制、不重新采样,适合截取精灵图、图标和单片机屏幕素材。默认导出 24 位 BMP,也可以导出 PNG,支持批量(每张按同样的设置裁剪),图片只在浏览器本地处理。Crop a bitmap (BMP) or any other image by exact pixel coordinates or percentages: enter the top-left position and the crop width and height (blank means up to the right or bottom edge), or crop a given size from the centre. A crop box that runs past the image is clipped to it, with a note. Pixels are copied one for one with no resampling — ideal for cutting sprites, icons and microcontroller-screen assets. The result is a 24-bit BMP by default, or PNG; works in bulk (every image is cropped the same way), and images are processed locally in your browser.
如何使用「位图裁剪(按像素或百分比裁剪 BMP)」?How do I use the Crop a Bitmap tool?
在「位图裁剪(按像素或百分比裁剪 BMP)」中,选择或拖入文件,按需设置「单位」、「位置」、「左边距 X」、「上边距 Y」、「宽度(空=到右边)」等选项,然后点击每个结果旁的「下载」按钮即可;有多个文件时也可以点「全部下载(ZIP)」一次打包下载。In the Crop a Bitmap: Choose or drop your files, set "Units", "Position", "Left X", "Top Y", "Width (blank = to edge)", then click the Download button next to each result (with several files, "Download all (ZIP)" saves them together).
怎么填写裁剪范围?How do I set the crop area?
“从左上角”时填写裁剪框左上角的 X、Y(从 0 开始,向右、向下增大)和宽、高,宽高留空就一直裁到右边或底边;“从中心”时只看宽和高,裁剪框放在图片正中。单位选“百分比”时所有数值都按图片宽高的百分比计算,适合批量裁剪尺寸不同的图片。With From top-left, enter the X and Y of the box's top-left corner (counting from 0, growing right and down) and its width and height; leave width or height blank to crop all the way to the right or bottom edge. With From centre only width and height are used and the box sits in the middle. In Percent units every value is a percentage of the image width or height — handy for batch-cropping images of different sizes.
裁剪会影响画质吗?Does cropping affect quality?
不会。裁剪只是按坐标逐个复制像素,不缩放、不重新采样,导出 BMP 或 PNG 都是无损的,裁出来的像素和原图完全一样。No. Cropping copies the pixels at those coordinates one for one, with no scaling or resampling, and both BMP and PNG are lossless, so the cropped pixels are identical to the original.
导出的 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)」的设置:「单位」可选 像素、百分比(默认 像素);「位置」可选 从左上角、从中心(默认 从左上角);「左边距 X」默认 0;「上边距 Y」默认 0;「宽度(空=到右边)」可留空;「高度(空=到底边)」可留空;「输出格式」可选 BMP、PNG(默认 BMP);可选文件:常见图片格式(含 HEIC、HEIF、AVIF、WEBP、BMP、JFIF)。改动任一选项后结果会按新设置重新生成。Settings in the Crop a Bitmap — "Units": Pixels, Percent (default Pixels); "Position": From top-left, From centre (default From top-left); "Left X" default 0; "Top Y" default 0; "Width (blank = to edge)" optional; "Height (blank = to edge)" optional; "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 Crop a Bitmap processes images locally with the browser Canvas API and the result downloads straight from your browser.
「位图裁剪(按像素或百分比裁剪 BMP)」免费吗?需要注册吗?Is the Crop a Bitmap free? Do I need an account?
「位图裁剪(按像素或百分比裁剪 BMP)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Crop a Bitmap is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.