I need to convert an extremely large image. The default resource limits of Image Magick are far too small.
The Image Magick website discusses changing the limits, but none of the syntaxes I've tried have worked, the commands aren't recognized.
For instance, I need to set the magick_disk_limit to something like 25GB. Then there will be a series of others to set, magick_area_limit, magick_height_limit, etc. How do I enter those commands?
What I've tried is
-limit width 100KP
convert -limit width 100KP
magick_disk_limit 25GB
MAGICK_DISK_LIMIT 25GB
In all cases the response is either command not found, or unrecognized resource type. I also tried putting in a convert command with all the -limit parameters defined as part of the command, like this:
convert -limit 100KP 100KP 100GP 14GiB 100GiB unlimited 5 8 0 unlimited Lunar_LRO_LrocKaguya_DEMmerge_60N60S_512ppd.tif MoonRelief.png
I have now tried export MAGICK_DISK_LIMIT=25GiB
, but then when I enter identify -list resource
the Disk limit hasn't changed.
convert -limit memory 12GB -limit map 25GiB -limit width 10MP -limit height 10MP -limit area 100GP -limit disk 30GiB Lunar_LRO_LrocKaguya_DEMmerge_60N60S_512ppd.tif MoonRelief.png
generates this list of warnings and errors
convert-im6.q16: Unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 34735 (0x87af) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 34736 (0x87b0) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 34737 (0x87b1) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 42112 (0xa480) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 42113 (0xa481) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: width or height exceeds limit `Lunar_LRO_LrocKaguya_DEMmerge_60N60S_512ppd.tif' @ error/cache.c/OpenPixelCache/3837.
convert-im6.q16: no images defined `MoonRelief.png' @ error/convert.c/ConvertImageCommand/3258.
export MAGICK_DISK_LIMIT=25GB
and running ImageMagick in the same terminal? – dessert May 28 '18 at 21:35export MAGICK_DISK_LIMIT=25GB
(notGiB
!) – that’s what the site you linked says… If you want 25GiB, use…=27GB
instead. – dessert May 29 '18 at 7:09