Page 1 of 1
Imagemagick version differences or OS difference
Posted: 2012-03-20T15:57:19-07:00
by webarto
Hi, this is my first thread, great forum by the way
I have a noob question. Same command is "not working" on different IM versions and OS. Is this because of different versions or I am doing something wrong? Thanks.
Debian - IM 6.2.8
Code: Select all
convert input.jpg -modulate 120,10,100 -fill "#222b6d" -colorize 20 -gamma 0.5 -contrast -contrast output.jpg
BAD
Code: Select all
convert input.jpg -modulate 120,10,100 -colorize 20 -gamma 0.5 -contrast -contrast output.jpg
OK without -fill
WinXP - IM 6.7.5
Code: Select all
convert input.jpg -modulate 120,10,100 -fill "#222b6d" -colorize 20 -gamma 0.5 -contrast -contrast output.jpg
OK
Re: Imagemagick version differences or OS difference
Posted: 2012-03-20T16:41:35-07:00
by fmw42
The old modulate (prior to IM v6.4.0-10) used HSB color space. Newer versions of IM use HSL colorspace, but (as of IM v6.5.3-7 and later) you can use a -define to set it to use HSB.
see
http://www.imagemagick.org/Usage/color_ ... colorspace
Re: Imagemagick version differences or OS difference
Posted: 2012-03-27T14:38:35-07:00
by webarto
I upgraded IM to 6.7.1-7, and results were still odd, the problem was quoted colors with escaped shell command. I have removed quotes and it is working fine on CentOS. I've linked Your's and Anthony's website on
http://net.tutsplus.com/tutorials/php/c ... -with-php/, without your extensive scripts it would be impossible to figure things out. Cheers.
Re: Imagemagick version differences or OS difference
Posted: 2012-03-27T16:41:52-07:00
by fmw42
If you are using PHP exec (?), then you have to be very careful about quoting and switching between double quote, single quotes and escaped quotes.
In the IM command line from a terminal, double quotes should work just fine. They are especially important when you have rgb colors in the cases where you have spaces there, such as "rgb(255, 100, 50)". It probably would work fine without the quotes if the spaces are removed. On some unix systems, you may have to quote hex values to avoid confusion with the #. However, I am not an expert on that. I always put my color values (not color names) in double quotes and have not had any problems doing so on my Mac OSX system (using the command line or my scripts from the terminal).
Re: Imagemagick version differences or OS difference
Posted: 2012-03-27T16:45:48-07:00
by fmw42
Very nice web site and your creation of Instagram-like effects. They seem to be very popular these days.