Use of '-levels' option
Posted: 2018-03-07T05:50:31-07:00
Hi,
I've got an gray scale raw image where every pixel is one byte in the range 0=black, 15=white. I wanted to convert this, and thought the -level option was the right one.
but this gives me an image mostly white with some black pixels.
To test this, create a grayscale image
And
I would expect this to be something similar to what '-normalize' would do, but I get a row of black pixels at the top the rest is white.
Is this a bug or am I using '-level' wrong?
Using Version: ImageMagick 6.9.9-11 Q16 x86_64 2017-09-30
(for Cygwin)
I've got an gray scale raw image where every pixel is one byte in the range 0=black, 15=white. I wanted to convert this, and thought the -level option was the right one.
Code: Select all
convert -size 104x160 -depth 8 gray:input -level 0,15 output.png
To test this, create a grayscale image
Code: Select all
convert -size 16x16 -depth 8 "gradient:black-gray(15)" 1.png
Code: Select all
convert 1.png -level 0,15 2.png
Is this a bug or am I using '-level' wrong?
Using Version: ImageMagick 6.9.9-11 Q16 x86_64 2017-09-30
(for Cygwin)