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
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 following 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.
replace your policy.xml with the code below, solved my case.
!!!! it will bypass any limit because no limit policy given.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)*>
<!ATTLIST policymap xmlns CDATA #FIXED ''>
<!ELEMENT policy EMPTY>
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
]>
<policymap>
<policy domain="Undefined" rights="none"/>
</policymap>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With