Before you open an image you can verify the format with python :

import imghdr
format = imghdr.what(image)

change the extension if necessary and open the file with QImage or QPixmap.

Note : imghdr return tiff format for some types of RAW image file, I use Dcraw
in this case.

Le 10/01/11 16:07, Mikael Modin a écrit :
Hi,

Thanks alot for the tip, now excuse me while I go strangle my
coworker, he told me he's sending me .png files.

Which module should I include to support decoding of jpg files?

/Mikael

On 10 January 2011 20:30, Vincent Vande Vyvre
<[email protected]> wrote:
Le 10/01/11 09:16, Mikael Modin a écrit :

Hi,

I'm trying to get my application working fully after freezing it with
cx_Freeze, but I'm having weird troubles with images. Some png's load
fine, others stop working after freezing.

I'm attaching two examples. Ar there different ways of encoding pngs?
Is the support these different ways in different Qt modules?

Kind regards,
Mikael

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Hi,

not working.png is not .png but .jpg

Change the extension ...


--
Vincent V.V.
Oqapy
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


    


--
Vincent V.V.
Oqapy
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to