I have everything working, for Qt5 writing out static GIF.  I can also write 
out a multi-framed gif, with varying delays outside the QImage system.

The only issue, is QImageIOWriter simply doesn't have support for multi-framed 
gif files like QImageIOReader does.

Ive looked into the code, and following the same architecture (using the same 
variables/attributes) and simply having 1 QImage written after another works, 
the only issue is for GIF (and others) you also have to have a reference to the 
previous frame.  Reading doesn't require this

Scott

From: Mitch Curtis <mitch.cur...@qt.io>
Sent: Monday, January 3, 2022 3:43 AM
To: Scott Bloom <sc...@towel42.com>; interest@qt-project.org
Subject: RE: QImageIOWriter for multi-framed images

For what it's worth, there is a task in Jira for being able to write GIFs:

https://bugreports.qt.io/browse/QTBUG-64889

From: Interest 
<interest-boun...@qt-project.org<mailto:interest-boun...@qt-project.org>> On 
Behalf Of Scott Bloom
Sent: Monday, 20 December 2021 9:20 PM
To: interest@qt-project.org<mailto:interest@qt-project.org>
Subject: [Interest] QImageIOWriter for multi-framed images

QImageIOReader supports multi-framed images for QMovie.

However, there doesn't seem to be any support in the writer for supporting such 
images. I checked 5.15.7 and the docs in Qt6 as well.

Is there a plan for this in the works in the future?

Most of the read relies on the IO Handler supporting it.  But for the writer, 
the handler only gets the single frame QImage itself, not the multiple frames.

Am I missing something?  I don't get access to the original/source multi-framed 
IO handler, so Im not sure how to add this functionality as a plugin at all.

For some context, there is a format call BIF, which comes from ROKU (streaming 
video etc) which represents frames from a video stream at various points.  
Players use this format as a compressed version of the movie so when you use 
the mouse over various points on the players timeline, it can show the "frame". 
 Typically its once every 10 seconds, between scaling of the image and this 
allows a 2 hour movie that's 10gigs in 2160p h265 encoding, to be represented 
in 6megs of data or so.

I already have created the QImageIOReader for BIF so I can view the file using 
QMovie.  Pretty straightforward.

However, I would like to be able to load a multi frame GIF and save it as  BIF 
and vice versa.  I already have the Multi-Frame GIF writer done as a stand 
alone class.  So I can feed it multiple QImage's with a delay and it writes out 
a functional gif movie.  However, I would like to make this a IO Plugin writer 
for GIF writing only.

Any ideas?

Scott
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to