Bug #15252 Updated: ImageCreateJPEG() crashes server

From: Date: Mon, 10 Jun 2002 00:04:36 +0000
Subject: Bug #15252 Updated: ImageCreateJPEG() crashes server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9962@lists.php.net to get a copy of this message
ID: 15252 Updated by: edink@php.net Reported By: cboer@pointit.nl -Status: Open +Status: Bogus Bug Type: GD related Operating System: WIN2000 PHP Version: 4.1.1 New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately your version of PHP is too old -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2002-01-28 22:50:09] elixer@php.net Update summary (can't read all caps). ------------------------------------------------------------------------ [2002-01-28 05:21:31] cboer@pointit.nl 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

« previous php.bugs (#9962) next »