Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to convert this image, http://en.wikipedia.org/wiki/File:Dijkstra_Animation.gif, to a series of .png files.

This was pretty simple, I used the convert command in Linux,

convert  Dijkstra_Animation.gif dijkstra.png

The command went fine and produced the 27 frames, as reported at the bottom of original page.

However, I find that some of the produced .png files are only single numbers or arrows. Which is different from what I expected.

I want the .png files to be a simple sequence in the same way the .gif file is showing. Could you please suggest a method (in Linux please) to achieve this?

Thanks.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Using the -coalesce option will do the wonder.

Like this,

convert -verbose -coalesce Dijkstra_Animation.gif dijkstra.png

Actually the -coalesce option "merges a sequence of images" as is claimed in the manual page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.