Imagemagick: no images defined (for output filename)

Viewed 1781

I'm trying to to do a basic convert:

$ convert image.png out.jpg

but getting error

convert-im6.q16: no images defined `out.jpg' @ error/convert.c/ConvertImageCommand/3258.

Why does it say "no images defined" if out.jpg is output image name?

$ ls
image.png
$ convert -version
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
2 Answers

I had the same issue and found the solution here: https://askubuntu.com/a/1195393.

In my case, the image I was trying to convert had dimensions that were larger than the ImageMagick policy limits. To fix this, go to /etc/ImageMagick/policy.xml and edit the the follow lines:

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

value is currently set to 10KP=10,000 pixels, so if your image is larger than that it won't be recognized by ImageMagick. Change value to be larger than the dimensions of the image you are working with.

For me, this happened when /tmp was full.

Related