GD and multiplying layers (images) or Imagick and changing colors

Hi all,

I am trying to merge two images with multiplying their values (just like
multiplying layers in any image processing tool, e.g. Photoshop) - using
GD library.

All I found is function imagelayereffect(), but option
IMG_EFFECT_MULTIPLY is apparently not implemented... My code looks like
this:

imagelayereffect($mapImage, IMG_EFFECT_MULTIPLY);
imagecopymerge($mapImage, $clickImage, 10, 10, 0, 0, $owidth, $oheight,
100);

and it of course does not work.

Do you have any idea, how to achieve the same as below Imagick code with
GD library??

$mapImage->compositeImage($clickImage, Imagick::COMPOSITE_BUMPMAP,
$x-$halfWidth, $y-$halfWidth);

OR how to optimize color change (color lookup table) with Imagick -
below code takes very long time and works much better with GD... :

$run = 'convert full.png -type TruecolorMatte colors.png -fx
"v.p{0,u*v.h}" final.png';
system($run);

TIA, m.
Marcin [ Sa, 04 August 2007 20:21 ] [ ID #1786937 ]
PHP » alt.php » GD and multiplying layers (images) or Imagick and changing colors

Vorheriges Thema: Why does it wait before echoing?
Nächstes Thema: XML Editor Script?