🔍

首页Home › 图片工具Image Tools

🔄 RGB 位图转 BGR(交换红蓝通道)Convert RGB Bitmap to BGR Bitmap

把普通 RGB 位图(BMP)或其他图片的红色和蓝色通道互换,生成 BGR 顺序的图片:绿色和透明度不变,结果逐像素精确。用于给要求 BGR 输入的 OpenCV、相机 SDK、显示屏驱动或嵌入式程序准备素材,或者检查一段 BMP 读写代码是否把颜色顺序弄反。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Swap the red and blue channels of a normal RGB bitmap (BMP) or any other image to get BGR order: green and transparency stay the same, exactly pixel for pixel. Use it to prepare images for OpenCV, camera SDKs, display drivers or embedded code that expect BGR input, or to check whether some BMP reading/writing code has the colour order the wrong way round. 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

「RGB 位图转 BGR(交换红蓝通道)」是什么?What is the Convert RGB Bitmap to BGR Bitmap tool?

把普通 RGB 位图(BMP)或其他图片的红色和蓝色通道互换,生成 BGR 顺序的图片:绿色和透明度不变,结果逐像素精确。用于给要求 BGR 输入的 OpenCV、相机 SDK、显示屏驱动或嵌入式程序准备素材,或者检查一段 BMP 读写代码是否把颜色顺序弄反。默认导出 24 位 BMP,也可以导出 PNG,支持批量,图片只在浏览器本地处理。Swap the red and blue channels of a normal RGB bitmap (BMP) or any other image to get BGR order: green and transparency stay the same, exactly pixel for pixel. Use it to prepare images for OpenCV, camera SDKs, display drivers or embedded code that expect BGR input, or to check whether some BMP reading/writing code has the colour order the wrong way round. The result is a 24-bit BMP by default, or PNG; works in bulk, and images are processed locally in your browser.

如何使用「RGB 位图转 BGR(交换红蓝通道)」?How do I use the Convert RGB Bitmap to BGR Bitmap tool?

在「RGB 位图转 BGR(交换红蓝通道)」中,选择或拖入文件,按需设置「输出格式」等选项,然后点击每个结果旁的「下载」按钮即可;有多个文件时也可以点「全部下载(ZIP)」一次打包下载。In the Convert RGB Bitmap to BGR 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 图片?When do I need a BGR image?

OpenCV 的 imread/imshow、很多工业相机和显示屏驱动、DirectX 的部分纹理格式都按 B-G-R 顺序处理颜色。如果程序直接把 RGB 数据当成 BGR 使用,红色会显示成蓝色。先用本工具转换一次,再交给这些程序,颜色就会正确;用普通看图软件打开转换后的图片,红蓝会是颠倒的,这是正常的。OpenCV's imread/imshow, many industrial cameras and display drivers, and some DirectX texture formats handle colour as B-G-R. If a program takes RGB data as BGR, red shows up as blue. Convert once with this tool before handing the image to such a program and the colours come out right; in a normal image viewer the converted picture shows red and blue swapped, which is expected.

RGB 转 BGR 和 BGR 转 RGB 有区别吗?Is RGB to BGR different from BGR to RGB?

没有区别,都是把红、蓝两个通道互换,所以转换两次就回到原图。两个工具分开只是为了方便查找;已经红蓝颠倒的图片请用“BGR 位图转 RGB”恢复。No — both simply swap the red and blue channels, so converting twice gives the original back. There are two tools only to make them easier to find; to fix an image whose colours are already swapped, use BGR Bitmap to RGB.

导出的 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.

支持哪些图片?会上传吗?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.

「RGB 位图转 BGR(交换红蓝通道)」免费吗?需要注册吗?Is the Convert RGB Bitmap to BGR Bitmap free? Do I need an account?

「RGB 位图转 BGR(交换红蓝通道)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert RGB Bitmap to BGR 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.

相关工具Related tools

🔁 BGR 位图转 RGB(修正红蓝颠倒的 BMP)Convert BGR Bitmap to RGB Bitmap🔀 图片 RGB 通道重排(BGR / GBR 等互换)Reorder RGB Channels in an Image✂️ 位图裁剪(按像素或百分比裁剪 BMP)Crop a Bitmap↔️ 位图水平翻转(左右镜像 BMP)Flip a Bitmap Horizontally↕️ 位图垂直翻转(上下颠倒 BMP)Flip a Bitmap Vertically🌗 位图反色(BMP 负片效果)Invert Bitmap Colours🎚️ 位图减色(减少 BMP 颜色数 / 索引色)Reduce Bitmap Colours🔲 去除位图边框(自动裁掉 BMP 四周的纯色边)Remove a Bitmap Border📐 位图缩放(调整 BMP 尺寸)Resize a Bitmap🔃 位图旋转(BMP 旋转 90° / 180° / 任意角度)Rotate a Bitmap🧪 位图分色(拆分 BMP 的红、绿、蓝通道)Separate Bitmap Colours✨ 位图锐化(BMP 反锐化掩模 / 拉普拉斯)Sharpen a Bitmap

← 全部工具All tools