Re: Problems with convert

Glenn Randers-Pehrson <[email protected]>
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
At 06:49 PM 11/2/2007 +0000, you wrote:
>On 11/2/07, Michael Lehn <[email protected]> wrote:
>> I want to visualize results of a numerical simulation.  This produces
>> for example 6000 images (typically I need much more):
>>
>>         data/particle_0001.gif
>>         data/particle_0002.gif
>>         data/particle_0003.gif
>>         data/particle_0004.gif
>>         data/particle_0005.gif
>>         data/particle_0006.gif
>>         data/particle_0007.gif
>>         ...
>>         data/particle_6000.gif
>>
>> My naive idea was to create an animated gif
>
>I would suggest another image format. How about generating a movie
>file, such as mpeg? You'll save a *huge* amount of space. Plus, if you
>encode correctly, you'll be able to seek backwards and forwards in
>your file.

Mpeg might not be too good for images from a numerical simulation.  If
it contains lines and sharp boundaries, the lossy compression of Mpeg
will not look good and will not compress well.

I would use MNG, and make a large tiled image, like a microfiche
film, containing all 6000
images in one PNG file, with MOVE and CLIP instructions to display
each tile in sequence.

convert -append <images 0000-0099> row00.ppm
convert -append <images 0100-0199> row01.ppm
...
convert -append <images 5900-5999> row59.ppm
convert +append row*.ppm all.png
rm row*.png

Then embed all.png in a MNG, supposing each tile is 200x200:
MHDR 200 200 ... ticks_per_second
DEFI 01 ... 19800 -200
all.png
LOOP 01 60
MOVE 01 01 -20000 200
LOOP 02 100
MOVE 01 01 200 0
SHOW 01 01
ENDL 02
ENDL 01
MEND

With the proposed AniPNG format, it would be a little simpler,
something like:

MHDR 200 200 ... ticks_per_second
DEFI 01 ... 19800 -200
all.png
LOOP 01 60
PLAY 01 -20000 200 ... ticks
LOOP 02 99
PLAY 01 200 0 ... ticks
ENDL 02
ENDL 01

Glenn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.