[Pygui] Convert RGBA to BGRA using standard library?
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Jun 22 01:18:20 CEST 2011
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
More information about the Pygui
mailing list