Information Line Command ImageMagick

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
juliobcn
Posts: 3
Joined: 2014-02-24T15:40:13-07:00
Authentication code: 6789

Information Line Command ImageMagick

Post by juliobcn »

Hello,

I bought a script which includes a default ImageMagick's command for creating thumbmails. I'm not satisfied with the contrast of the thumbmails and i would like to make some tests adding more contrast/colours

This is the actual command that the script uses is:

Code: Select all

-enhance -strip -unsharp 1.0x1.0+0.5 -unsharp 1.0x1.0+0.5 -modulate 110,102,100 -unsharp 1.0x1.0+0.5 -contrast -gamma 1.2 -resize %SIZE% %INPUT_FILE% -filter Lanczos -filter Blackman -quality 95 %OUTPUT_FILE%
Could you explain me what options i have to remove or add to make some tests to add more contrast on my output thumbmail.

Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Information Line Command ImageMagick

Post by fmw42 »

see -brightness-contrast, -gamma, -auto-level, -contrast-stretch, -level, -auto-gamma, -contrast and -sigmoidal-contrast at http://www.imagemagick.org/script/comma ... ptions.php. Also see http://www.imagemagick.org/Usage/color_mods/

You may be able just to increase your -gamma value for starters.

P.S.

Code: Select all

-filter Lanczos -filter Blackman
In your code, you probably are getting only one or the other, I suspect the latter. And -filter usually goes before -resize, though in IM 6 it may not matter.

For thumbnails, you may want to replace -resize with -thumbnail, since it will remove all the meta data and make your output image filesize smaller.
juliobcn
Posts: 3
Joined: 2014-02-24T15:40:13-07:00
Authentication code: 6789

Re: Information Line Command ImageMagick

Post by juliobcn »

Hello fmw42,

Thanks for your fast reply but sorry i didn't understood well your explanation. What you mean by
You may be able just to increase your -gamma value for starters.
Do you mean i can just increase my -gamma value to have more contrast on the final result?

Also about
-filter Lanczos -filter Blackman
what is wrong ?

In my default line code i have -contrast , can i add -contrast more times to test ?

My objective is to have more contrast on my final image, what options i have to put to have this result, i'm a little lost with all those commands.

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Information Line Command ImageMagick

Post by fmw42 »

juliobcn wrote:
You may be able just to increase your -gamma value for starters.
Do you mean i can just increase my -gamma value to have more contrast on the final result?
Yes, you have -gamma 1.2 in your code. So try increasing it to 1.5 or 2
juliobcn wrote:Also about
-filter Lanczos -filter Blackman
what is wrong ?
As I said before, IM uses only one -filter argument in any command line for a given resize operation. So only one is being used. You can try removing one or the other and see which is best for you. If you want both then it would need to be -filter XX -resize YY -filter ZZ -resize 100%. But this is not very good practice. You should find one filter that works. Or use a filter with one of the -define controls for blurring or sharpening. See http://www.imagemagick.org/Usage/filter/ and http://www.imagemagick.org/Usage/filter/nicolas/
juliobcn wrote:In my default line code i have -contrast , can i add -contrast more times to test ?
There is no control for -contrast. So if you want more contrast, you would have to repeat -contrast as many times as you need.

But you can also use -brightness-contrast bri,con in its place and leave con=0. Then use bri=10 or 20 or 30, whatever works for you.
juliobcn
Posts: 3
Joined: 2014-02-24T15:40:13-07:00
Authentication code: 6789

Re: Information Line Command ImageMagick

Post by juliobcn »

Thanks,

I will make thoses tests.
Post Reply