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

QImage.convertToFormat fails to convert from RGB888 to Mono

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 5.7.1
    • None
    • 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

            allan.jensen Allan Sandfeld Jensen
            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