LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Imagemagick convert yields blank image (http://www.linuxquestions.org/questions/linux-software-2/imagemagick-convert-yields-blank-image-441576/)

jlinkels 05-04-2006 10:37 AM

Imagemagick convert yields blank image
 
Hi all,

I am sure I am the only one in the world who uses Imagemagick's convert command, and if not, I am sure I am the only one with this problem.

But maybe there is ONE single individual who ran into the same problem and can help me.

I use convert to enhance the levels on an image. Generally to increase contrast so the picture becomes more black&white instead of gray.

When I use
Code:

convert -level 12%,78%,0.7 in.pnm out.pnm
it works fine and as expected.

However, when I do:
Code:

convert -level 30,200,0.7 in.pnm out.pnm
it yields a blank (white) image.

There should be no difference between the two parameter sets. When no percent sign is added, it uses absolute values for black_point and white_point. When a percent sign is added, it means convert uses a percentage of the full scale value.

Does anyone see what I do wrong?

Version: ImageMagick 6.0.6 11/29/04 Q16 http://www.imagemagick.org

jlinkels

ataraxia 05-04-2006 01:05 PM

Better quote the % signs, in case your shell eats them.

That's all I got!

jlinkels 05-04-2006 01:57 PM

Thanks ataraxia, but it is the string without the percents I have a problem with.

I agree with you that I should have quoted the percented string though.

jlinkels

Spudley 05-05-2006 07:10 AM

Have you tried adjusting the levels a bit, see what happens? I can see you're trying to set the same values (12% -> 30 and 78% -> 200) but what if you change the 30 to, say, 20 or 40? Does it still come out blank? How about 50 or 60?

Can't really be that much more help at the moment, I'm afraid. I only use imagemagick fairly rarely, and I've never had a need to play with the level function. But I'd be interested to hear how it goes.

All the best.

jlinkels 05-05-2006 08:41 AM

Yes, I did.

Even -level 0,255,1 gives a blank picture.

jlinkels


All times are GMT -5. The time now is 05:16 AM.