Jason Tackaberry wrote: > On Mon, 2006-12-04 at 11:28 +0100, Duncan Webb wrote: >> The encoding of image.get_raw_data(format='RGBA') seems to give a >> buffer, that pygame can't process. 'RGB' works fine but has no alpha >> channel so the icons look bad. pygame can't handle 'BGRA' images. > > get_raw_data() always returns a buffer object. As discussed on IRC > yesterday, if you need a string to pass to pygame, just pass the buffer > to str(). It won't be exceptionally fast but it will work. But I'm not > sure why RGB worked at all, unless you were already converting the > buffer to a string using str().
Sure I have used str(image.get_raw_data(format=image.mode)) I've figured it out, just now, the mode was being set to BGRA from the image data but it needed converting to RGBA. Thanks Duncan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
