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

QImageWriter::write() always uses inappropriately low compression when writing to webp format

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.4
    • 5.9.1
    • Image formats
    • None

    Description

      When asked to save an image to .webp format (even if it is already a .webp image), QImageWriter uses the lowest possible compression by default, resulting in images that, while very small, are unusably bad. qimagewriter::setQuality(100) seems to have no effect, either.

      This issue was discovered when debugging an issue in KDE Gwenview. The code in question is here: https://cgit.kde.org/gwenview.git/tree/lib/document/documentloadedimpl.cpp#n81

      I've attached a sample jpeg image and the ugly webp image that it becomes when QImageWriter is used to convert it.

      Attachments

        1. original jpeg image.jpg
          87 kB
          Nate Graham
        2. image after conversion to webp.webp
          6 kB
          Nate Graham
        For Gerrit Dashboard: QTBUG-64437
        # Subject Branch Project Status CR V

        Activity

          People

            vgt Eirik Aavitsland
            pointedstick Nate Graham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes