john taylor wrote:

>hi all,
>
>i have a string of pixel values, which uses the BGRA
>color model, is there an easy way (hopefully the most
>efficient way) to convert it into the RGBA model, so
>that the image can be displayed correctly?
>  
>
b,g,r,a = original_image.split()
new_image= Image.merge("RGBA", (r,g,b,a))

BTW, there is an almost identical example in the documentation, section 
"Cutting, Pasting and Merging Images / Example: Splitting and merging 
bands" - please read the docs.

   Les
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to