Gimp切换颜色通道

问题描述 投票:0回答:1

我正在嵌入式设备上捕获一个原始帧缓冲区。 帧缓冲区是32位BGRA颜色模式。

cp /dev/fb0 framebuffer.data

我可以将原始转储传输到我的PC上,然后导入GIMP,但GIMP只允许我读取原始数据,就像读取ARGB一样,这导致颜色不正确。 有没有办法在GIMP中直接切换红色和蓝色通道?

framebuffer gimp
1个回答
1
投票

你可以尝试在GIMP中使用通道混合器--它允许从图像的原始RGB组件中混合新的RGB组件。

在截图中,我取了一个简单的图像,有一个红色、绿色和蓝色的柱子,并告诉通道混合器将红色变成绿色,绿色变成蓝色,蓝色变成红色。原始颜色显示在图像的下半部分,变换后的颜色显示在图像的上半部分。

Channel mixer apploied on a simple red, green and blue image - orginal colors in the lower half, transformed in the upper half


0
投票

我找到了一个办法,用gstreamer转换颜色,做截图...

#!/bin/bash

cp /dev/fb0 /home/root/framebuffer.data
gst-launch-1.0 filesrc location="/home/root/framebuffer.data" ! rawvideoparse use-sink-caps=false width=800 height=1280 format=bgra  ! imxvideoconvert_ipu !  videoconvert ! pngenc snapshot=false compression-level=1 ! filesink location=/home/root/screencap.png
rm /home/root/framebuffer.data

© www.soinside.com 2019 - 2024. All rights reserved.