From:             jraben at alstermedia dot de
Operating system: Win XP
PHP version:      5.1.2
PHP Bug Type:     *Graphics related
Bug description:  Graphics errors on multiple processes

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 bug report at http://bugs.php.net/?id=36418&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36418&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36418&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36418&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36418&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36418&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36418&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36418&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36418&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36418&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36418&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36418&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36418&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36418&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36418&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36418&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36418&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36418&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36418&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36418&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36418&r=mysqlcfg

Reply via email to