ID: 36418 Updated by: [EMAIL PROTECTED] Reported By: jraben at alstermedia dot de -Status: Open +Status: Bogus Bug Type: GD related Operating System: Win XP PHP Version: 5.1.2 -Assigned To: +Assigned To: pajoye New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. You should consider to check concurrent accesses before writing the images. Previous Comments: ------------------------------------------------------------------------ [2006-02-16 17:13:27] jraben at alstermedia dot de btw I also tried the recent snapshot of php 5. Same bug. ------------------------------------------------------------------------ [2006-02-16 17:10:29] jraben at alstermedia dot de Ok! Try this script: http://www.alstermedia.de/phpbug.zip Give 777 to out and script. For for finish and check all pics. Almost on every run there are 3-4 pics with corrupted background. If you do not see a bug try to refresh serveral times. I included a corrupted pic called "1.jpg". ------------------------------------------------------------------------ [2006-02-16 16:19:39] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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
