Re: bgr -> rgb

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



Hmmm. Yeah - that routine occured to me - however I didn't want to waste time doing a manual coversion. I was hoping there was some way I could get v4l to give me RGB.

Sorry to ask a question that has already been discussed on the list - can someone give me a link to the previous discussion? (I just started getting the list.)

thanks,
Korwin Smith


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;
}



_______________________________________________
Video4linux-list mailing list
Video4linux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/video4linux-list

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





[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