🔁 BGR 位图转 RGB(修正红蓝颠倒的 BMP)Convert BGR Bitmap to RGB Bitmap
把按 BGR 顺序保存、显示时红蓝颠倒的位图转换成正常的 RGB:每个像素的红色和蓝色通道互换,绿色和透明度不变,结果逐像素精确。常见于 OpenCV、部分相机和工业设备 SDK、显卡截图或自己写的 BMP 导出代码(BMP 文件本身就按 B-G-R 存储像素,写错一步就会颜色反转)。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Fix a bitmap that was saved in BGR order and shows red and blue swapped: the red and blue channels of every pixel are exchanged while green and transparency stay the same, exactly pixel for pixel. This happens with OpenCV, some camera and industrial SDKs, GPU captures and home-made BMP writers (BMP files store pixels as B-G-R, so one wrong step swaps the colours). The result is a 24-bit BMP by default, or PNG; works in bulk, and images are processed locally in your browser.
使用说明与常见问题How-to & FAQ
「BGR 位图转 RGB(修正红蓝颠倒的 BMP)」是什么?What is the Convert BGR Bitmap to RGB Bitmap tool?
把按 BGR 顺序保存、显示时红蓝颠倒的位图转换成正常的 RGB:每个像素的红色和蓝色通道互换,绿色和透明度不变,结果逐像素精确。常见于 OpenCV、部分相机和工业设备 SDK、显卡截图或自己写的 BMP 导出代码(BMP 文件本身就按 B-G-R 存储像素,写错一步就会颜色反转)。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Fix a bitmap that was saved in BGR order and shows red and blue swapped: the red and blue channels of every pixel are exchanged while green and transparency stay the same, exactly pixel for pixel. This happens with OpenCV, some camera and industrial SDKs, GPU captures and home-made BMP writers (BMP files store pixels as B-G-R, so one wrong step swaps the colours). The result is a 24-bit BMP by default, or PNG; works in bulk, and images are processed locally in your browser.
如何使用「BGR 位图转 RGB(修正红蓝颠倒的 BMP)」?How do I use the Convert BGR Bitmap to RGB Bitmap tool?
在「BGR 位图转 RGB(修正红蓝颠倒的 BMP)」中,选择或拖入文件,按需设置「输出格式」等选项,然后点击每个结果旁的「下载」按钮即可;有多个文件时也可以点「全部下载(ZIP)」一次打包下载。In the Convert BGR Bitmap to RGB Bitmap: Choose or drop your files, set "Format", then click the Download button next to each result (with several files, "Download all (ZIP)" saves them together).
怎么判断图片是 BGR 颠倒的?How can I tell an image is BGR-swapped?
最明显的是肤色发蓝、天空和海水发橙、红色的东西变成蓝色,而黑白灰部分完全正常(因为灰色的 R、G、B 相等,互换后不变)。这时转换一次就能恢复;如果转换后颜色反而不对,说明原图本来就是 RGB,不需要转换。The tell-tale signs are blue skin, orange skies and sea, and red objects turned blue, while black, white and grey look fine (grey has equal R, G and B, so swapping changes nothing). One conversion fixes it; if the colours look wrong afterwards, the image was RGB already and needed no conversion.
BGR 和 RGB 有什么区别?转换两次会怎样?What is the difference between BGR and RGB? What if I convert twice?
两者只是三个颜色通道的存放顺序不同:RGB 依次是红、绿、蓝,BGR 依次是蓝、绿、红。BMP 文件内部按 B-G-R 存储,Windows 和 OpenCV 也常用 BGR,读写时如果没有换序就会颜色颠倒。互换是对称的,转换两次就回到原图,所以 RGB 转 BGR 也是同一个操作。They differ only in the order the three channels are stored: RGB is red, green, blue and BGR is blue, green, red. BMP files store pixels as B-G-R internally, and Windows and OpenCV often use BGR too, so forgetting to reorder when reading or writing swaps the colours. The swap is symmetric — converting twice gives the original back, so RGB to BGR is the same operation.
支持哪些图片?会上传吗?Which images work, and are they uploaded?
支持 JPG、PNG、WebP、GIF(静态或动图的第一帧)、BMP、AVIF、HEIC,以及浏览器能打开的 SVG;可一次拖入最多 50 张批量处理,单张最大 60 MB、1 亿像素;多张结果可打包成 ZIP 下载。所有处理都在你的浏览器里完成,图片不会上传,结果中也不会保留 EXIF 等元数据(包括拍摄位置)。JPG, PNG, WebP, GIF (a still or the first frame of an animation), BMP, AVIF, HEIC, and SVG that the browser can open. Drop in up to 50 images at once; each can be up to 60 MB and 100 megapixels, and several results can be downloaded as a ZIP. Everything happens in your browser: images are not uploaded, and EXIF and other metadata (including location) is not kept in the results.
「BGR 位图转 RGB(修正红蓝颠倒的 BMP)」免费吗?需要注册吗?Is the Convert BGR Bitmap to RGB Bitmap free? Do I need an account?
「BGR 位图转 RGB(修正红蓝颠倒的 BMP)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert BGR Bitmap to RGB 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.