ID:               23808
 Updated by:       [EMAIL PROTECTED]
 Reported By:      i dot a at signalsystem-bz dot it
-Status:           Open
+Status:           Feedback
 Bug Type:         GD related
 Operating System: Win2k server
 PHP Version:      4.3.2RC4
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Could you provide a copy of the images used in your example as well as
the expected output image.


Previous Comments:
------------------------------------------------------------------------

[2003-05-26 04:24:58] i dot a at signalsystem-bz dot it

I had under php 4.3.1 some code to blend in transparency a logo over
some pictures before displaying them - all was working perfectly.
When i installed php 4.3.2rc4, i noticed that the same code stopped
working - where first was blending 2 images, now is acting this way:
- with high transparency value in imagecopymerge, the 2nd image covers
totally the destination one and the transparent color is drawed all
grey
- with low transparency value in imagecopymerge, the 2nd image
transparent color becomes very dark-black and covers the destination
image

the code i'm using is below:

if (isset($_REQUEST['img'])) $img=$_REQUEST['img']; else $img='';
        
$b = imagecreatefromjpeg($img);
$bx = imagesx($b);
$by = imagesy($b);
ImageAlphaBlending($b, true);
$logoImage = ImageCreateFromPNG('logo.png');
$logoW = ImageSX($logoImage);
$logoH = ImageSY($logoImage);
if ($logoW > $bx or $logoH > $by) 
{
        $x1 = $bx;
        $y1 = $bx*$logoH/$logoW;
        if ($x1 > $bx or $y1 > $by)
        {
                $y1 = $by;
                $x1 = $by*$logoW/$logoH;
        }
        $b1 = imagecreatetruecolor($x1,$y1);
        imagecopyresampled($b1,$logoImage,0,0,0,0,$x1,$y1,$logoW,$logoH);
        imageDestroy($logoImage);
        $logoImage = $b1;
        $logoW = $x1;
        $logoH = $y1;
}
ImageCopyMerge($b,$logoImage,($bx - $logoW)/2,($by -
$logoH)/2,0,0,$logoW,$logoH,14); 
        
imagejpeg($b,"blend.jpg",90); 
imageDestroy($b);

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23808&edit=1

Reply via email to