How to convert (.gif to .png) this image to get the original view

conversiongifpng

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 the 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 (for Linux please) to achieve this?

Best Answer

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.

Related Question