Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-222

Conversion from bytes to QImage fails, occasionally

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 1.2.0
    • PySide
    • None
    • Fedora/Linux

    Description

      I've been working with QImages and QPixMaps to display data created on the fly and then converted to uint data "manually"
      Pixmaps are created using:

      image = myokit.ColorMap.image(self._colormap, nx, ny)
      image = QtGui.QImage(image, nx, ny, QtGui.QImage.Format_ARGB32)
      self._colormap_pixmap.convertFromImage(image, Qt.ColorOnly)
      

      Weirdly, this usually works, but fails other times. I can't be more specific I'm using multiple pixmaps, and loading reloading them. Mostly it goes fine, but now and then one (not always the same one, not always after the same number of loads etc.) will have a few garbled pixels (usually towards the end of the data). I spent a day and a half looking for issues with my part of the code, trying to track down the bug. Eventually I tried PyQt where it works flawlessly (no changes except for changing the imports). So I've no idea what's wrong, but something's messed up with PySide's handling of the QImage() creation. The weirdness then propagates to the pixmap: checking a pixel, converting to pixmap, converting back to image and checking the pixel again gives a different result, so I'm guessing something goes seriously wrong internally.

      Sorry I can't be more specific

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            michaelclerx Michael Clerx
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes