[PyQt] QImage in BI24 format

David Cortesi davecortesi at gmail.com
Wed Sep 19 03:33:54 BST 2012


>
> I have a C-library creating an image supposedly in in BI24 format (video
> application)
>
> Now I'd like to display the image.
>
> I tried to set the pixel format to QImage.Format_RGB888
>
> and I can see the image.
> However the red and blue colors are inversed.
>

I don't know if this will help, but maybe.

I was displaying some grayscale PNG files and sometimes for no reason they
would show black and white reversed (or inverted).

I changed the ImageConversionFlag argument from the default of Qt.AutoColor
to Qt.ColorOnly and the inversion no longer happened.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120918/e28f1ea9/attachment.html>


More information about the PyQt mailing list