kobik
kobik

Reputation: 21252

GIF to AVI with windows Animate Control

I was trying to convert a GIF image (Ajax waiting like):

waiting GIF...

to AVI that will be used with TAnimate control (win32 animation control).

I have tried a few tools, but the problem is that the output AVI is either not suitable for the Animation control or not transparent.

Notes:

Do you know any tool that can help me with this conversion?

EDIT:

I have tried using ImageMagic with ffmpeg as described here. but I can't seem to set ffmpeg to encode to msrle.

Upvotes: 5

Views: 2965

Answers (4)

Mark Ransom
Mark Ransom

Reputation: 308530

Jasc Animation Shop is able to directly read an animated GIF and write out a compressed AVI. This is an old program that appears to be no longer offered by Corel (who acquired Jasc), but you may still be able to find the free trial version for example.

Upvotes: 5

Michał Turecki
Michał Turecki

Reputation: 3197

I would suggest using GDIPlus native image renderer which can easily handle animated GIFs as well as many other image types, including multi-frame TIFFs (no MNG so far). I was able to find an example component which animates TImage instance:

http://www.progdigy.com/forums/viewtopic.php?p=13156

Please note I am aware that you are looking for a solution to AVI transparency, this is just an alternative way of presenting user with a "progress", which seems to be more lightweight (no dependency on windows media playback facilities) and flexible (such animation controller can be used on any image).

Upvotes: 1

Warren  P
Warren P

Reputation: 69114

Many commercial tools do this conversion, including Corel Photo Paint, and others. A free trial is available for Corel Photo Paint, which comes included in the Corel Draw package. (Warning: It's huge, and expensive.) I don't think the transparency will be solved any more by corel photo paint's conversion than by anybody else.

Typing some words into Google, also reveals that DSPack from ProgDigy might help you.

The last time I did this, I abandoned the attempt to convert GIF transparency into AVI-with-transparency, because no AVI-encoding tool that I could find would preserve transparency. Thus the solution of leaving it as a gif, and putting a new control into your app (as LaKraven suggests) may be superior in the end, to fighting it.

Upvotes: 1

LaKraven
LaKraven

Reputation: 5869

You could try the TGIFImage component (written for Delphi 5), which claims not only to support Animated GIFs, but also Transparency, as well as a means of converting a GIF to an AVI (and vice-versa).

Whether it does all that or not I cannot say as I haven't personally tested it. Like TLama mentioned in the OP comments above, I use my own means of playing each frame in an animated fashion (only mine uses a RES file and a TImage, where each frame is stored as a PNG for full semi-transparency support).

Upvotes: 3

Related Questions