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

add support for writing GIF and animated GIF

    XMLWordPrintable

Details

    Description

      I wrote https://github.com/ec1oud/qt-gif-plugin a long time ago to be able to write static GIF images. I'd still like to get that updated for Qt 5 and into qtimageformats. At that time the Qt project was not interested because gif was already considered obsolete, the patent encumbrances were still questionable, etc. But they still have not gone out of use, and the patents are all expired now.

      Beyond that, it would be nice to be able to record animated GIFs somehow: e.g. extend the qml runtime to have that feature, like qmlviewer had in Qt Quick 1. The crude way I came up with for now is 1) connect to one of the QQuickWindow signals like frameSwapped or afterRendering, and use it to save every frame to a PNG file (because we don't have any gif-writing support at all); 2) use mogrify to convert the PNGs to GIFs; 3) use gifsicle to assemble the animated GIF.

      So, cutting out step 2 (the slowest one by far) by being able to write static GIFs would already be helpful. But I wonder if writing the animation is within the scope of an imageformat plugin, or should be done in qtmultimedia in the same way as recording a movie to some other video format.

      And finally it would be best to make the process of reading images back from GPU memory as efficient as possible (if there's even any room for improvement there).

      Animated GIFs are useful for blog posts and bug reports, for artistic purposes and for use on web pages in general.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes