6

I tried to execute following command:

$ convert 1.png -filter 'Jinc ( +clone -negate -morphology Distance Euclidean -level 50%,-50% )' -morphology Distance Euclidean -compose Plus -composite -level 43%,57% -resize 12.5% 1.png

It gives me:

convert: no images defined `1.png' @ error/convert.c/ConvertImageCommand/3187.

but it is exists! I tried to execute that command with the debug option enabled:

$convert 1.png -filter 'Jinc ( +clone -negate -morphology Distance Euclidean -level 50%,-50% )' -morphology Distance Euclidean -compose Plus -composite -level 43%,57% -resize 12.5% 1.png -debug all

I get this output: http://pastebin.com/gsw7KszH

What's wrong with my ImageMagick's configuration? I use the latest macOS.

JavaRunner
  • 2,455
  • 5
  • 38
  • 52
  • Where did you get that command from? What is it trying to do? – Mark Setchell Feb 26 '17 at 10:20
  • As you have the output image with the same as the input image the problem is probably with the output image and not the input one - try changing the output name to confirm that. On a Linux type system you need to escape ( & ) with a \ is that the same on a mac? But as Mark says the code looks a bit odd as well. – Bonzo Feb 26 '17 at 10:32
  • 2
    Please check package: Ghostscript. If you don't have this:```brew install ghostscript``` – ThienSuBS May 19 '17 at 10:20
  • Ghost Script install did NOT solve this on OSX. – Paul Kenjora Jul 27 '19 at 20:38
  • 1
    I had the same issue and fixed it by making the output file name different from the input name. – Grasshopper Mar 01 '21 at 11:04

1 Answers1

1

You can try specifying the filename after the composite operator, something like this:

$ convert 1.png \
   -filter 'Jinc ( +clone -negate -morphology Distance Euclidean -level 50%,-50% )' \
   -morphology Distance Euclidean \
   -compose Plus \
   -composite 1.png \
   -level 43%,57% \
   -resize 12.5% 1.png
Nehal J Wani
  • 16,071
  • 3
  • 64
  • 89
  • I believe you are mistaken in your assertion that `-composite` requires a filename. It merely carries out whatever operation was defined by the preceding `-compose` operator and leaves the result in the image stack. – Mark Setchell Feb 26 '17 at 10:18