Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58119

Faster rendering of QImage in QGraphicsView using QGraphicsPixmapItem

    XMLWordPrintable

Details

    Description

      When redering a QImage with Format RGB888 or pure 8 bit Grayscale, i first create a QPixmap and set it to a QGraphicsPixmapItem, which belongs to a QGraphicsview as follows:

      QImage image; //assume it contains a RGB888 or 8bit Grayscale Image with FullHD resolution.
      graphicsPixmapItem->setPixmap( QPixmap::fromImage(image) ); // graphicsPixmapItem is added in the QGraphicsView

      The whole process takes about 7 or more milliseconds on a i7 6700K Processor that runs with up to 4GHZ.

      It seems that Qt is converting the Image to RGB32 before displaying it.

      My Question is: Cant Qt provide a way to render the content directly more efficient without any conversion?

      I wrote an OpenGL Renderer that takes the image as it is and directly renders it. It does not take more than 1ms.

      When building applications that display multiple images this would be very helpful without wasting computational ressources.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            tompollok Thomas Pollok
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes