[solved] swap color channels from BGR to RGB

Hello,
I have a strange problem with my webcam when I use it in 320x240 mode: the R and B color channels of every frames seems to be “swapped”… :slight_smile:

here is a couple of captured frames to clarify what I mean… :slight_smile:

that’s a driver problem almost sure. try reporting it to the gspca authors:

sxhaard@free.fr

or/and in the ubuntu bugtracker

https://launchpad.net/ubuntu/+bugs

Thank you for the advice :mrgreen:

This is useful to me. Thanks!

I’m trying to convert 32 bit BGRA to RGBA and I think I need to tweak this a little. Unfortunately, my math isn’t so great. With the current formulae I just get an odd green pixelation over only the top half of the image.

Any help would be appreciated.

Thanks,
Zach