|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-16 16:10 UTC] tony2001@php.net
[2006-02-16 16:19 UTC] pajoye@php.net
[2006-02-16 17:10 UTC] jraben at alstermedia dot de
[2006-02-16 17:13 UTC] jraben at alstermedia dot de
[2006-02-16 17:21 UTC] pajoye@php.net
[2006-02-20 15:20 UTC] jraben at alstermedia dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 13:00:02 2025 UTC |
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.