ID: 15252 Updated by: elixer Old Summary: IMAGECREATEJPEG CRASHES SERVER Reported By: [EMAIL PROTECTED] Status: Open Bug Type: GD related Operating System: WIN2000 PHP Version: 4.1.1 New Comment:
Update summary (can't read all caps). Previous Comments: ------------------------------------------------------------------------ [2002-01-28 05:21:31] [EMAIL PROTECTED] When using jpg picture when PHP says it is corrupt (when it is not) then Server crashes with function imagecreatefromjpeg. See source below ! $srcImg = imagecreatefromjpeg($fileName); $scale = 4; // create a (blank) smaller image object $srcSize = getimagesize($fileName); $dstImg = imagecreate($srcSize[0]/$scale, $srcSize[1]/$scale); // copy and resize from the source image object to the smaller blank one imagecopyresized($dstImg, $srcImg, 0, 0, 0, 0, $srcSize[0]/$scale, $srcSize[1]/$scale, $srcSize[0], $srcSize[1]); // send the smaller image object to the browser $plaatje = imagejpeg($dstImg); // clean up imagedestroy($scrImg); imagedestroy($dstImg); ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15252&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]