Hello,
I am creating copyright messages on the fly, however no matter what opacity I set the PNG-8 to it always displays too dark. I have 3 separate files depending on whether the image to be displayed is light, medium or dark. The code is here :
$env = $_SERVER['DOCUMENT_ROOT'];
$abpath1 = $env . "output/$gallery_img";
if ($gallery_contrast == "L") { $abpath2 = $env . "copyright4.png"; }
if ($gallery_contrast == "M") { $abpath2 = $env . "copyright5.png"; }
if ($gallery_contrast == "D") { $abpath2 = $env . "copyright6.png"; }
$image = $abpath1;
list($width, $height) = getimagesize($image);
$background = imagecreatefromjpeg($image);
$insert = imagecreatefrompng($abpath2); $dest_x = ( $width / 2 ) - ( 225 / 2 ); $dest_y = ( $height / 2 ) - ( 250 / 2 );
imagecolortransparent($insert,imagecolorat($insert,0,0));
$insert_x = imagesx($insert);
$insert_y = imagesy($insert);
imagecopymerge($background,$insert,$dest_x,$dest_y,0,0,$insert_x,$insert_y,35);
imagepng($background,"",50);
All the "merged" images seem to be ignoring the opacity in the copyright images and although it looks fine on the "light" images, on the dark ones the copyright text is too "in your face". Can anyone give me any pointers?
Thanks