Page 1 of 1

showkernel=1 not outputting

Posted: 2018-03-10T00:33:24-07:00
by afre
In my discussion with snibgo on another forum, his example

Code: Select all

convert xc: -define showkernel=1 ^
  -morphology Convolve:0 Gaussian:0x2 null: 2>&1 | findstr Kernel
doesn't output anything; i.e., the part up to null:. If I do

Code: Select all

convert xc: -define showkernel=1 ^
  -morphology Convolve:0 Gaussian:0x2 info:
the output is

Code: Select all

xc: XC 1x1 1x1+0+0 16-bit sRGB 0.000u 0:00.093
So:
1. There should be some sort of output since showkernel=1.
2. The kernel given by info: should not be 1x1 in size.

I installed the latest IM and got the same result.

As an aside, I noticed that the installer places IM in the Windows system path instead of the user one. Is there a reason for that?

Re: showkernel=1 not outputting

Posted: 2018-03-10T00:57:45-07:00
by snibgo
Ha, fancy meeting you here!

For IM v7, you should use "magick" instead of "convert".

The command (with "convert") works fine for me with IM v6.9.5-3. But v7.0.3-5 with "magick" gives me no text at all. This looks like a bug.


The default Windows installation directory is something like "C:\Program Files\", which makes it usable by anyone. At installation, you should be able to choose any directory you want.

EDIT:
afre wrote:2. The kernel given by info: should not be 1x1 in size.
"info:" doesn't show the kernel, but the image. You specified the image to be "xc:" with no size specified, so the size defaulted to 1x1.

In ImageMagick, kernels are not images. The only direct way of getting data about a kernel is with "-define showkernel=1". This is different to G'MIC, where a kernel is an image (with only one channel), and the same operations can be made to kernels as to ordinary images.

Re: showkernel=1 not outputting

Posted: 2018-03-10T01:19:58-07:00
by afre
Thanks for confirming this bug. I installed the legacy convert since that is what I am used to. By path, I meant the ones under environment variables.

Re: showkernel=1 not outputting

Posted: 2018-03-10T13:31:06-07:00
by magick
Use -define morphology:showKernel=1.

Re: showkernel=1 not outputting

Posted: 2018-03-10T14:44:55-07:00
by afre
Thanks! I was looking at the IM v6 Examples where there are 3 ways to define this but Command-line Options does consistently have the morphology: prefix.

Re: showkernel=1 not outputting

Posted: 2018-03-10T14:58:14-07:00
by fmw42
It seems to be wrong here https://www.imagemagick.org/Usage/convo ... el_scaling and I have notified the author. It seems to be correct here https://www.imagemagick.org/script/comm ... php#define. Is there some other place that it shows wrong?

Re: showkernel=1 not outputting

Posted: 2018-03-10T16:49:47-07:00
by afre
Oops, I should have provided the links. This is where the 3 ways are shown https://www.imagemagick.org/Usage/morph ... showkernel and where every example uses -define showkernel=1 like on the convolve page.

Code: Select all

    -define morphology:showkernel=1    
    -define convolve:showkernel=1    
    -define showkernel=1