Why my ImageMagick performs colortoning with different resul
Posted: 2013-03-14T03:20:35-07:00
I found Instagraph PHP library (GitHub, NetTuts) for photo filters. However, I found out on my box it does not output the same images as presented on NetTuts.
I localized the issue and it has to be within colortone function, because otherwise filters work well. Let's take Toaster as a showcase, because it performs only one colortone transformation. Code generated by the colortone PHP function (bash-escaped):
The rest of sequence of command to complete the filter (those should be all right):
And now, let's look at the expected result of the Toaster filter:
However, my script produces following:
It is a lot darker, but I have no idea why. There are probably only two options to explain such behavior:
Could anyone help me to get the expected output?
I filed similar StackOverflow question and an issue on GitHub.
I localized the issue and it has to be within colortone function, because otherwise filters work well. Let's take Toaster as a showcase, because it performs only one colortone transformation. Code generated by the colortone PHP function (bash-escaped):
Code: Select all
convert test.jpg \( -clone 0 -fill '#330000' -colorize 100% \) \( -clone 0 -colorspace gray -negate \) -compose blend -define compose:args=100,0 -composite test.jpg
Code: Select all
convert test.jpg -modulate 150,80,100 -gamma 1.2 -contrast -contrast test.jpg
convert test.jpg \( -size 960.0x960.0 radial-gradient:none-LavenderBlush3 -gravity center -crop 640x640+0+0 +repage \) -compose multiply -flatten test.jpg
convert test.jpg \( -size 960.0x960.0 radial-gradient:#ff9966-none -gravity center -crop 640x640+0+0 +repage \) -compose multiply -flatten test.jpg
However, my script produces following:
It is a lot darker, but I have no idea why. There are probably only two options to explain such behavior:
- Author of the library has a bug in his library. (I do not think so, but it is still possible...)
- My ImageMagick is different than author's and so it produces different results. (How that can happen?)
Code: Select all
$ convert --version
Version: ImageMagick 6.7.7-10 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
I filed similar StackOverflow question and an issue on GitHub.