Page 1 of 1
Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:04:27-07:00
by gormonn
Hello!
To composite images i use:
Code: Select all
$canvas->compositeimage($image, Imagick::COMPOSITE_MULTIPLY, 10, 150);
http://php.net/manual/ru/imagick.compositeimage.php
How to use that with blend mode "Linear-dodge"?
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:29:03-07:00
by fmw42
Moved to Imagick forum
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:29:56-07:00
by gormonn
sorry, misunderstood
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:33:10-07:00
by fmw42
Apparently, from
http://us3.php.net/manual/en/imagick.co ... ompositeop, they did not implement linear_dodge. Imagick is not well maintained and does not have all the options in Imagemagick. You may have to use PHP exec() to do that.
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:34:24-07:00
by fmw42
gormonn wrote:sorry, misunderstood
This is the specific forum dedicated to Imagick
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:39:08-07:00
by fmw42
The closest I see is colordodge. You could try that. Otherwise, use PHP exec() with the command line version of the code you want to implement.
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:41:42-07:00
by fmw42
According to
http://www.imagemagick.org/Usage/compose/#lineardodge, it is the same as -compose plus, except for partially transparent pixels.
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:43:18-07:00
by gormonn
Hmm... okay... but imageck haven't constant with that blend mode:
http://php.net/manual/ru/imagick.constants.php
That is why I asked a question there.
I do not understand how to write the correct command.
I tried to understand anything from the documentation, but did not understand, and therefore do nothing at random to failed:
Code: Select all
$cmd = convert '.$result.' img/ach/mozg4.png -compose linear-dodge -define compose:args=100,0 -composite img.png';
exec($cmd);
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:48:19-07:00
by gormonn
Hmm... ok, Thank you! i'l try it!
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T10:48:52-07:00
by fmw42
Yes, that is correct. Imagick does NOT have that mode. So you have two choices.
1) try using COMPOSITE_PLUS
2) use PHP exec()
-define compose:args=100,0
That will choose one or the other image. So it will do nothing useful. You would have to use some mix, such as 50,50.
Re: Blend mode: Linear-dodge in php
Posted: 2014-11-19T11:00:21-07:00
by gormonn
COMPOSITE_PLUS helped!
Thank you so much, fmw42! Or how you real name? Fred?
You saved me from sleepless nights!
Happiness and success to you!