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

QImage save to BMP is broken when bytesPerLine != width

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.3
    • 4.7.4, 4.8.4
    • Image formats
    • None

    Description

      I construct an 8-bit indexed QImage around an existing memory buffer, using the constructor that takes bytesPerLine argument. My image has width=6144, bytesPerLine=8192.
      Then I call QImage::save() to save the image to BMP file.
      The resulting BMP file does not look normal. I think QImage::save() does not handle bytesPerLine correctly.
      I have written a small program, that demonstrates this problem. You will have to create a sample 8-bit indexed image, that has width=6144.

      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
            koprok Todor Prokopov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes