Page 1 of 1
consume all tmp diskspace, with convert -density 600
Posted: 2008-03-03T08:07:48-07:00
by dlink
Hi,
We run this. (which generates multiple files: image-0.jpg .. image-45.jpg)
Code: Select all
$ convert -rotate "90<" -resize 800x image.pdf image.jpg
But when we add
-density 600:
Code: Select all
$ convert -density 600 -rotate "90<" -resize 800x image.pdf image.jpg
ImageMagick consumes diskspace and eventually errors out with this message:
Code: Select all
unable to extend cache `/tmp/magick-XXEm2zGZ: No space left on device.
For example, one pdf file might have 100 pages, each 798x618, and take up 80 Mb on disk. The available diskspace on /tmp is 2.7 Gb.
Any advice or help with this problem, is greatly appreciates.
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-03T08:20:07-07:00
by magick
The solution is to increase your available temporary disk space. Assume a filesystem, /data, with 120GB of free space. Your command becomes:
- export MAGICK_TMPDIR=/data
convert -density 600 -rotate "90<" -resize 800x image.pdf image.jpg
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-03T12:12:33-07:00
by dlink
Thank you!
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-05T11:01:20-07:00
by dlink
Dear Magick,
I have set the MAGICK_TMPDIR to a large storage device, as you suggested, and that is now working. convert now uses it, but is still failing.
I am working with pdf of between 20 and 100 pages.
While this command works:
convert -density 300 -rotate "90<" -resize 800x 3001153.pdf output.jpg
Changing the density to 600 does not work:
convert -density 600 -rotate "90<" -resize 800x 3001153.pdf output.jpg
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 1797 1 3 %oparray_pop 1796 1 3 %oparray_pop 1792 1 3 %oparray_pop --nostringval-- --nostringval-- 22 1 29 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1681 0 9 %oparray_pop --nostringval-- --nostringval-- - Dictionary stack: - --dict:1088/1123(ro)(G)-- --dict:2/20(G)-- --dict:74/200(L)-- --dict:74/200(L)-- --dict:105/127(ro)(G)-- --dict:259/300(ro)(G)-- --dict:21/25(L)-- --dict:4/6(L)-- --dict:20/20(L)-- - Current allocation mode is local - Last OS error: 27 - GPL Ghostscript 8.56: Unrecoverable error, exit code 1 - convert: unable to read image data `/data/imagemagick_tmpdir/magick-XXMpFcOa. - convert: Postscript delegate failed `3001153.pdf. - convert: missing an image filename `output.jpg.
Thank you for your help.
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-05T12:47:16-07:00
by magick
See if this works:
- convert -limit memory 1 -limit map 1 -density 600 -rotate "90<" -resize 800x 3001153.pdf output.jpg
if not its possible Ghostscript is choking on your image. You could rotate one page as in:
- convert -density 600 001153.pdf[1] -rotate "90<" -resize 800x output.jpg
Otherwise you may need a different program such as xpdf. Also keep in mind that ImageMagick is a raster-based utility. If your PDF is vectorized you probably want to use something like acrobat to rotate your PDF pages since it maintains your vectors without rasterizing like ImageMagick does.
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-05T15:46:35-07:00
by dlink
Thanks.
Tried the -limit memory 1 -limit map 1, but that didn't work either.
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 1797 1 3 %oparray_pop 1796 1 3 %oparray_pop 1792 1 3 %oparray_pop --nostringval-- --nostringval-- 22 1 29 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1681 0 9 %oparray_pop --nostringval-- --nostringval-- - Dictionary stack: - --dict:1088/1123(ro)(G)-- --dict:2/20(G)-- --dict:74/200(L)-- --dict:74/200(L)-- --dict:105/127(ro)(G)-- --dict:259/300(ro)(G)-- --dict:21/25(L)-- --dict:4/6(L)-- --dict:20/20(L)-- - Current allocation mode is local - Last OS error: 27 - GPL Ghostscript 8.56: Unrecoverable error, exit code 1 - convert: unable to read image data `/data/imagemagick_tmpdir/magick-XXQf9G6d. - convert: Postscript delegate failed `3001153.pdf. - convert: missing an image filename `output.jpg.
Re: consume all tmp diskspace, with convert -density 600
Posted: 2008-03-05T16:27:21-07:00
by magick
It appears that Ghostscript is choking on your PDF, most likely it is consuming too much memory. Try using Ghostscript directly from the command line and see if that works.
Re: consume all tmp diskspace, with convert -density 600
Posted: 2013-04-26T02:09:21-07:00
by mangledorf
I'm still having this problem. Any solution?