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

Converting an animated gif to webp with QImage::save does not preserve the animation.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.14.2
    • Image formats
    • None
    • Linux/X11

      I have been trying to convert all my image formats to webp in my application in order to save space.

      When I convert animated gifs to webp, which also supports animations, the conversion produces a still image:

      	QImage image("image.gif"); // 60 frames
      	QBuffer buffer;
      	{
      		image.save( "image.webp" );
      	}
      	QImageReader imageReader( "image.webp" );
      	{
      		imageReader.setDecideFormatFromContent(true);
      	}
      	qDebug() << imageReader.imageCount(); // Produces 1 instead of 60
      

      I would expect that animated gifs converted in QImage, would preserve the animation, or there would be an obvious way to do this in some other way.

       

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

            vgt Eirik Aavitsland
            akiva Akiva Avraham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes