Frames Optimization

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Therand
Posts: 3
Joined: 2015-11-19T06:10:53-07:00
Authentication code: 1151

Frames Optimization

Post by Therand »

Hi,

I need help about imagemagick .
Note that I am running windows seven 64 .

I have to extract .gif out frames .png
So I do: "C:\Program Files\ImageMagick-6.9.2-Q16\mogrify.exe" -coalesce -format png "C:\Users\Desktop\base\*.gif "

My concern is that coalesce "removes" the optimization, or most optimizations on my gif are only pauses.
So for my .png, he has no time to pause between frames and my animation is too fast!

My question is, how do I show 5 times the frame before optimization to give the illusion of a break when I would read my .png files.

Thank you in advance and sorry for my language, I'm a french user ^^
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Frames Optimization

Post by snibgo »

I'm not sure what you are asking. PNG files don't have a delay setting, because they are not animated files. If you convert a GIF to many PNG files, the PNG files have no delay.
snibgo's IM pages: im.snibgo.com
Therand
Posts: 3
Joined: 2015-11-19T06:10:53-07:00
Authentication code: 1151

Re: Frames Optimization

Post by Therand »

No, I have the original gif, I would simply convert the "optimization delay" in >> "copy last frame optimize X5".
And then turn it while png.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Frames Optimization

Post by Bonzo »

You can get a version of .png as an animation https://en.wikipedia.org/wiki/APNG
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Frames Optimization

Post by fmw42 »

Bonzo wrote:You can get a version of .png as an animation https://en.wikipedia.org/wiki/APNG
But APNG animations are not playable in browsers. It is not well supported.

If the OP is asking to separate each frame into a PNG, then that is feasible

convert animation.gif animation.png

Since png does not support multiple-frame files, the result will be multiple images: animation-0.png, animation-1.png ... animation-N.png
Therand
Posts: 3
Joined: 2015-11-19T06:10:53-07:00
Authentication code: 1151

Re: Frames Optimization

Post by Therand »

yes, I get this result!
I have a program to read: animation-0.png, wait, animation-1.png, wait, animation-2.png, wait, animation-3.png, ...

my problem is, for example if "animation-24.png" contained optimization (in the old gif), if it has disappeared in png.
The solution would be to copy the frame 24 without optimization and paste x5 (animation-25.png, animation-26.png, animation-27.png, animation-28.png and animation-29.png).

It's possible?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Frames Optimization

Post by fmw42 »

try adding -coalesce when converting your animation.gif to individual png frames. see
http://www.imagemagick.org/script/comma ... p#coalesce
http://www.imagemagick.org/Usage/anim_basics/#coalesced
Post Reply