[Pygui] Convert RGBA to BGRA using standard library?

Sidney Markowitz sidney at sidney.com
Tue Jun 21 20:26:55 CEST 2011


geoff wrote, On 22/06/11 12:23 AM:
> Greg, I had to solve this problem in another application and ended up using
> the array module and the with the slice syntax.

That works quite well, just 3.5 times slower than PIL. Adding it to the test I
posted before (with a slight tweak to the cStringIO version to assign
(c1,c2,c3,c4) = instead of four separate assignments), which saves about 0.3
seconds:

With cStringIO:   4.10693502426
With PIL:         0.019492149353
With array slice: 0.0696752071381


More information about the Pygui mailing list