Re: [Pygui] Convert RGBA to BGRA using standard library?

Greg Ewing <[email protected]>
Newsgroups gmane.comp.gnome.gtk+.python,gmane.comp.python.pyobjc.devel,gmane.comp.python.pygui,gmane.comp.python.windows
Message-ID <[email protected]>
geoff wrote:

> Greg, I had to solve this problem in another application and ended up 
> using the array module and the with the slice syntax.
> 
> import array
> 
> input = "rgbaRGBA1234"
> ba = array.array('c', input)
> ba[0::4], ba[2::4] = ba[2::4], ba[0::4]

Yep, I was thinking the same thing myself. I'll give it a try
next time I'm working on the problem.

Thanks,
Greg
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.