Is it possible to create a gif file, or better, animated gif file in Qt?



  • Qt can read gif files or animated gif files, but it seems as it cannot create them. Is there any way around this problem? Does anyone tried to create animated gif with using Qt or with using something else? Thanks.



  • There is no way to use Qt to write gif files. However, there are quite a few third party libraries that do have support for writing gifs and you might be able to use one of them (I think somebody tried to develop a Qt plugin that supports writing gifs, but I don't think it ever got finished).


  • Moderators

    bq. Qt can read gif files or animated gif files, but it seems as it cannot create them.

    AFAIK you can't. Do you really need animated gif? Qt provides other ways for making animations.



  • Well, is it possible to create a file in any other standard animated format, such as AVI, mpg, ...?


  • Moderators

    I don't know what you want to do exactly, so have a look at the "animation framework":http://doc.qt.nokia.com/4.7/animation-overview.html. there are plenty of examples.


  • Moderators

    [quote author="Eddy" date="1312470585"]I don't know what you want to do exactly, so have a look at the "animation framework":http://doc.qt.nokia.com/4.7/animation-overview.html. there are plenty of examples.[/quote]

    I think the original poster is looking for a way to create animated media files from a series of frames, i.e. constructing an animated gif, mpg, avi, etc.

    Though I've never used it personally, I know someone who's used "CxImage":http://www.xdp.it/cximage.htm before (if I recall correctly) to do this sort of thing. But, I don't know a lot about it.



  • Eddy, animation framework is for creating animated GUI. I do not need that. I need the following. Say, I have a set of image files (for example, 100 of them) representing sequential frames. I want to make an animated file from those frames. There are a few standard options, including animated gif, AVI, mpg, etc. Can Qt help me in doing that? If Qt cannot help, then are there any other options which I could use to make my code to produce an animated file? Animated gif is one of the most widely used standards, and, by the way, Qt can read it. It would be nice, for example, if QMovie could save frames in animated gif, AVI or any other standard format. I just wonder maybe someone already tried to produce a file in a standard animated format?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.