<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Before you open an image you can verify the format with python :<br>
    <br>
    import imghdr<br>
    format = imghdr.what(image)<br>
    <br>
    change the extension if necessary and open the file with QImage or
    QPixmap.<br>
    <br>
    Note : imghdr return tiff format for some types of RAW image file, I
    use Dcraw <br>
    in this case.<br>
    <br>
    Le 10/01/11 16:07, Mikael Modin a écrit :
    <blockquote
      cite="mid:AANLkTimz2ArQxb_cEDmcZsrqGbJuW_irDuusAhmMm0+6@mail.gmail.com"
      type="cite">
      <pre wrap="">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
<a class="moz-txt-link-rfc2396E" href="mailto:vincent.vandevyvre@swing.be"><vincent.vandevyvre@swing.be></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>

Hi,

not working.png is not .png but .jpg

Change the extension ...


--
Vincent V.V.
Oqapy
_______________________________________________
PyQt mailing list    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>

</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Vincent V.V.<br>
      <a href="https://launchpad.net/oqapy">Oqapy</a></div>
  </body>
</html>