ID:               36418
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jraben at alstermedia dot de
 Status:           Feedback
 Bug Type:         GD related
 Operating System: Win XP
 PHP Version:      5.1.2
 New Comment:

Please provide a set of source images and a valid script to reproduce
the problems. That means a working script, valid filenames, source
images, etc.



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

[2006-02-16 16:10:18] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip



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

[2006-02-16 15:31:17] jraben at alstermedia dot de

Description:
------------
It's a script that joins a background .gif picture with transparent png
24-bit pictures to a thumb jpg. It actually no the complete script.
$bfile is always the same. $file and $target may vary.

Some files have corrupted backgrounds, if the script is started in
multiple instances at the same time. Seems to be a memory allocation
bug.

Reproduce code:
---------------
$img = @imagecreatefromgif("$bfile");
$imgobj = @imagecreatefrompng("$file");
imagealphablending ( $imgobj, true );
$width = imagesx($imgobj);
$height = imagesy($imgobj);
$imgnew = imagecreatetruecolor($width, $height);
imagecopyresampled($imgnew,$img,0,0,$x,$y,$width,$height,$width,$height);
imagecopyresampled($imgnew,$imgobj,0,0,0,0,$width,$height,$width,$height);
imagejpeg($imgnew, $target, 90);


Expected result:
----------------
Not currupted pictures as .jpg with $bfile gif as background and $file
.png as foreground.

Actual result:
--------------
Some files have corrupted backgrounds, if this script is started in
multiple instances at the same time. Seems to be a memory allocation
bug or something with loading the same picture multiple times at the
same time.


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


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

Reply via email to