Re: bgr -> rgb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 2001.03.01 00:09:34 +0100 yeah ok wrote:
> For some reason when I ask video4linux for RGB24 I get BGR24. Is there 
> anyway to get actual RGB24 or is there an easy way to convert?

Its not just 'some reason'.....but that has been discussed several times
here.
I think the easiest way is something like this:

image+=width*height*3;
i=width*height*3;
while(i) {
	i-=3;
	image-=3;
	tmp=**image;
	**image=**(image+2);
	**(image+2)=tmp;
}





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux