Re: convert -rotate fails on large images
[email protected] Mon, 2 Mar 2009 16:59:11 -0800
| Newsgroups | gmane.comp.video.image-magick.bugs |
|---|---|
| Message-ID | <[email protected]> |
> The pdf->jpg conversion fails on linux due to memory issues See http://www.imagemagick.org/script/architecture.php#cache for insight into how ImageMagick allocates memory. You can trade memory usage for disk space with the following command: convert -limit memory 128mb -limit map 256mb image.pdf -rotate 90 image.jpg With this command, pixels are processed on disk reducing memory usage but slowing down the process because disk is much slower than memmory. The process will complete though as long as you have plenty of free disk space. By default, under Linux temporary space is allocated at /tmp. You can change this with an environment variable. Suppose you have plenty of free space at /data. Use these commands: export MAGICK_TMPDIR /data convert -limit memory 128mb -limit map 256mb image.pdf -rotate 90 image.jpg If the cores idle just be patient. ImageMagick is trading disk I/O for memory I/O. You may have better luck with recent releases of ImageMagick which supports parallel processing on multiple cores.