convert large amount of .eps files to a single .gif animation

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
leospsea
Posts: 1
Joined: 2015-08-06T00:47:53-07:00
Authentication code: 1151

convert large amount of .eps files to a single .gif animation

Post by leospsea »

Dear all,

I am trying to convert a large amount of .eps files (7500 files) to a single .gif animation. However I can't conclude the process. I am getting the following error:

Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop --nostringval-- 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1793 0 3 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:83/200(L)--
Current allocation mode is local
Last OS error: 28
Current file position is 956282
GPL Ghostscript 9.05: Unrecoverable error, exit code 1



I don't have this error when I try with less images, for instance, 900 files.

I am using the following command.

convert -delay 10 -loop 0 *.eps animation.gif

Any ideal how to solve this problem?

Thank you very much.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert large amount of .eps files to a single .gif animation

Post by snibgo »

Perhaps you have a memory problem. How large is each frame (width and height)? If they are 2000x1000 pixels, so 2 M pixels each, at 8 bytes/pixel they each need 16 MB of memory. "Convert" will try to read them all into memory. 7500 frames would need 120 GB of memory. Do you have this much memory?

For assembling large animations, ffmpeg is probably a better choice. I don't think it can read eps, so you will need to use ImageMagick or Ghostscript to convert each frame to png (or tiff or whatever) first.
snibgo's IM pages: im.snibgo.com
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: convert large amount of .eps files to a single .gif animation

Post by 246246 »

leospsea wrote: Last OS error: 28
I think this means disk full in linux/Unix.
http://bugs.ghostscript.com/show_bug.cgi?id=693208 or viewtopic.php?t=15749
If so, set the environment variable MAGICK_TMPDIR to proper directory that have more free space, and better also set TMPDIR or TEMP for ghostscript processing. See http://ghostscript.com/doc/9.05/Use.htm
Post Reply