Page 1 of 1
ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T02:21:56-07:00
by Airon65
I tried to execute following command:
Code: Select all
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 tells 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.
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T02:30:15-07:00
by fmw42
To do a debug. put debug all right after convert. Why do you have single quotes in your command?
Perhaps you are using Windows convert and not IM convert?
If in a .bat file, then you must double the % to %%
Why do you have -filter Jinc? It is a setting for -resize and so should come right before -resize. Though filter jinc is rather an odd one to be using? What are you trying to do?
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at
viewtopic.php?f=1&t=9620
For novices, see
viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T02:55:36-07:00
by Airon65
Thanks a lot for the reply! I use macOS Sierra 10.12.3 and its bash terminal. If you don't mind I'll answer to you with the commands from my terminal:
Code: Select all
$ ls -la 1.png
-rw-r--r--@ 1 mavick staff 657340 26 feb 11:26 1.png
$ convert -version
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-04-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib jng jpeg lcms png tiff xml zlib
$ 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
-bash: syntax error near unexpected token `('
$ 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
convert: no images defined `1.png' @ error/convert.c/ConvertImageCommand/3187.
$ convert -debug all 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 2> output.txt
$ open output.txt
// I've just uploaded it here: http://pastebin.com/UQbuTJr4
$ convert 1.png -filter 'Jinc ( +clone -negate -morphology Distance Euclidean -level 50%,-50% )' -resize 12.5% -morphology Distance Euclidean -compose Plus -composite -level 43%,57% 1.png
convert: no images defined `1.png' @ error/convert.c/ConvertImageCommand/3187.
I've uploaded new `-debug all` output here:
http://pastebin.com/UQbuTJr4
As for my task: I'm preparing my big image for using it as SDF font. It needs to be downsampled 8 times. Actually I don't know why do I use "Jinc" filter. It was just written in the tutorial for the SDF technology
and I just use that command.
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T03:18:43-07:00
by fmw42
In Unix you must escape parenthesis as \( .... \). No quote are needed. Can you post a link to your SDF technology where it says to use filter jinc?. Again the -filter jinc needs to be just before -resize. It does not relate to any other command that I know.
See
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/compose/
http://www.imagemagick.org/Usage/basics/#clone
http://www.imagemagick.org/Usage/filter/
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T04:36:44-07:00
by Airon65
As for the link to that tutorial actually it's on Russian language:
https://habrahabr.ru/post/282191/
In Unix you must escape parenthesis as \( .... \). No quote are needed.
Wow it almost work! I got downsampled image:
with the command:
Code: Select all
$ convert 4.png -filter Jinc \( +clone -negate -morphology Distance Euclidean -level 50%,-50% \) -resize 12.5% -morphology Distance Euclidean -compose Plus -composite -level 43%,57% 4r.png
I don't know why but they get blurred output images like this:
Maybe some filter doesn't work for me? Why do I get output image so sharp?
That algorithm based on contrast so it should looks blurred at this stage
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T05:14:43-07:00
by Airon65
If I use BW 8-bit png I get this result:
but where's my chars?
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T05:34:44-07:00
by Airon65
Yep I finally got it!
Unbelievable but now I get TOO much blurred image
Could you please tell me how can I get the blurriness like here (ImageMagic section)? I get another output with imagemagick...
Re: ImageMagick's convert tells me: no images defined
Posted: 2017-02-26T09:18:49-07:00
by snibgo
Please paste a link to your input file, and show us your command.