I'm trying to trim the border of an image using convert -trim image.png
. This gives me
convert-im6.q16: no images defined 'image.png' @ error/convert.c/ConvertImageCommand/3258.
Trimming a gif or jpg gives me the same error.
I used convert -trim *.png
yesterday and that still works. Only trimming a specific file fails. When I tried to trim a second batch it gave me the error.
>>> convert -version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.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 wmf x xml zlib
I'm running Ubuntu 18.04.2 LTS.
Your command may work, but notice that it did not process image3.png. You got only image3-0.png image3-1.png, but no image3-2.png. I am surprised that even works that much without issuing an error message. So it does not process the last image. So note that with just one image, you will get an error message convert: no images defined x1.png'. The bottom line is that it is not a proper ImageMagick convert command. If you want to process all images in a folder, use mogrify, not convert. Then your syntax will work as
mogrify -trim *.png