contrast-stretch

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
coulon

contrast-stretch

Post by coulon »

I'm trying out the -contrast_stretch option like this:
convert paysage3.jpg -contrast-stretch 15%x60% paysage4.jpg

The result is indeed a more contrasted image, but I always obtain the same image when I change the percentages. I've tried out all sorts of absurd and extreme pairs of percentages.

I'm using version 6.4.9-8 on XP. What am I doing wrong?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: contrast-stretch

Post by Bonzo »

I am not sure but I think you will need to escape the % on windows with another %

Try:

Code: Select all

convert paysage3.jpg -contrast-stretch 15%%x60%% paysage4.jpg
I can not find the relavent section on Anthony's site at the moment.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: contrast-stretch

Post by fmw42 »

Bonzo wrote:I am not sure but I think you will need to escape the % on windows with another %

Try:

Code: Select all

convert paysage3.jpg -contrast-stretch 15%%x60%% paysage4.jpg
I can not find the relavent section on Anthony's site at the moment.

see http://www.imagemagick.org/Usage/api/#windows
coulon

Re: contrast-stretch

Post by coulon »

This works fine with %%. Thanks.

But if this is not documented, imagemagick should at least display an error
message when I type something wrong!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: contrast-stretch

Post by anthony »

Im is not seeing anything wrong. DOS is screwing it up before IM sees it!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply