Re: A possible bug in converting palletized images to QImage

Christopher Barker <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Mauricio Muñoz Lucero wrote:
> I am making an image converter using PIL 1.1.7 and PyQt 4.6 for the gui.
> 
> Everything goes perfect, except when i try to convert an image in "P"
> mode (8 bit pixels and using a colour palette) to QImage, using the
> ImageQt module.
...
> Is it really a bug or am i using incorrectly the ImageQt module?

That would be a question for a QT list.

But another option is to convert the image form palette to RGB (or RGBA0 
with PIL instead. Something like:

im = PIL.Image(the_image_file)
im = im.convert('RGB')

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.