Page 1 of 1

ImageMagick:

Posted: Thu Feb 13, 2020 7:53 pm
by peter_b
[PROBLEM]
Trying to split an insanely-wide image (>500.000px width) in 30.000px sections:

Code: Select all

$ convert video_motion.png -crop 30000 video_motion-%02d.png
Throws the following error:
convert: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert: cache resources exhausted `/opt/dva-profession/workflow/07-scene_cut_detection/final/v-20104/metadata/video_motion.png' @ error/cache.c/OpenPixelCache/3945.
convert: no images defined `video_motion-%02d.png' @ error/convert.c/ConvertImageCommand/3258.


[SOLUTION]
I've increased the "disk" size to allow to use more space for ImageMagick to swap.
Edit the following line in /etc/ImageMagic-6/policy.xml (on Debian 11.0):

Code: Select all

<policy domain="resource" name="disk" value="10GiB"/>
Another thing to try would be to increase "memory", but there wasn't too much RAM in that machine so I went directly for "disk".

ImageMagick: split/crop error "no images defined"

Posted: Tue Feb 20, 2024 1:07 am
by peter_b
Again, splitting the very same images, I ran into the following error:

Code: Select all

$ convert video_motion.png -crop 30000 out-%02d.png
convert-im6.q16: no images defined `out-%02d.png' @ error/convert.c/ConvertImageCommand/3258.
I seem to have forgotten to write down the following change, too:

In `/etc/ImageMagic-6/policy.xml`, there's a limit set - above which resolution, a source is not considered valid ("default: web-safe"):

Code: Select all

<policy domain="resource" name="width" value"16KP"/>
<policy domain="resource" name="height" value="16KP"/>
Simply change "value=" to whatever suits your needs.

Example:
My images are 1 pixel per video frame (@25+ fps source) - so they may be as wide as 360.000px. A QC analysis graph :D
I set mine to:

Code: Select all

<policy domain="resource" name="width" value"640KP"/>