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

QImage.convertToFormat fails to convert from RGB888 to Mono

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.7.1
    • Fix Version/s: 5.9.2
    • Labels:
      None
    • Environment:
      I use Qt5.7.1 on 64-bit Fedora Linux.

      Description

      The method QImage::convertToFormat() fails to convert an image from RGB888 to Mono. The following code returns a Null image.

      // image is a QImage in format RGB888QVector<QRgb> colors(2);
      image.convertToFormat(QImage::Format_Mono, colors)T

      The conversion does work as expected if I do not specify a color vector. Also, the conversion does work as expected if the image is in format RGB32 rather than RGB888. I attach a minimal test case

        Attachments

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

          Activity

            People

            • Assignee:
              allan.jensen Allan Sandfeld Jensen
              Reporter:
              skebekus Stefan Kebekus
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes