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

QOpenGLWidget::grabFramebuffer is darker than screen: not doing same gamma correction?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12
    • 5.6.1
    • GUI: OpenGL
    • None
    • Mac OSX 10.11.6, latest xcode, Qt5.6.1 release
    • macOS

    Description

      The QImage produced by QOpenGLWidget::grabFramebuffer is much darker than what appears onscreen (see attached images) – seems like some kind of gamma correction factor is missing? It would be much more useful if the resulting image reflects what is seen onscreen – perhaps as an option?

      Relatedly, when I recently switched from using the QGLWidget to the QOpenGLWidget, it seems that this gamma factor got introduced, as the same underlying opengl rendering code now produces a much brighter image. I have searched extensively for any info about this but can't seem to find anything – perhaps some underlying OpenGL flag somewhere set globally on the entire window that automatically applies a gamma transform?

      Attachments

        1. distmat_rel_untrained.png
          163 kB
          Randall O'Reilly
        2. Screen Shot 2016-08-10 at 3.59.52 PM.png
          312 kB
          Randall O'Reilly
        3. test.png
          178 kB
          Randall O'Reilly
        For Gerrit Dashboard: QTBUG-55245
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            rcoreilly Randall O'Reilly
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes