I imagine it's not that hard to roll your own, if you can find out what the 
details of the formats are.  If it's as simple as just swapping the R and B 
bytes in the string, you could make an array of bytes and do some swapping.

If a spec is not readily available, I would try using a library that does the 
conversion for you on a very small image, and then compare the RGBA and BGRA 
versions and see if the bit twiddling that needs to be done is obvious (or can 
be deduced).

Matt

On May 28, 2011, at 10:06 AM, David Cortesi wrote:

> 
> Can anyone think of an efficient way to convert a string
> full of RGBA image data to BGRA, using only what's available
> in the standard library?
> 
> ImageMagick, the venerable graphic toolbox, claims to do this conversion, and 
> there are versions of it that can be loaded as python libs. Follow the links 
> at  www.imagemagick.org
> 
> _______________________________________________
> Pygui mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/pygui

_______________________________________________
Pygui mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pygui

Reply via email to