ID: 39780 User updated by: pz at mysqlperformanceblog dot com Reported By: pz at mysqlperformanceblog dot com Status: Analyzed Bug Type: GD related Operating System: Linux PHP Version: 5.2.0 Assigned To: pajoye New Comment:
Sure image is invalid. This is not the point. The function is specified as it ether returns image or FALSE on error. If it also can in case of error terminate script execution or format the hard drive it is better to be specified in docs :) Now regarding what I provide - the name of the file does not matter in this case as image is created from memory buffer. I just gave you the real image on which my thumbnail generation script failed. Out of few millions of images processed many were malformed etc but in most cases PHP handles it correctly by reporting FALSE and printing appropriate warning. So at least this behavior is inconsistent. Previous Comments: ------------------------------------------------------------------------ [2006-12-08 21:47:30] [EMAIL PROTECTED] The image is invalid. Either the buffer is incomplete or the CRC is wrong. You can try with different image viewers, the lower part will miss, more or less depending on how tolerant is the reader. It is also important to tell us directly what you provide, like a png named as gif, it minimizes the time we need to test or analyze your problem. If you used imagecreatefromgif it will simply fail, so yes, which functions you use to open this image is important. I will check if returning false is a safe choice. It should be but I need to test it first. ------------------------------------------------------------------------ [2006-12-08 20:17:42] pz at mysqlperformanceblog dot com Here is the copy of the image: http://www.mysqlperformanceblog.com/files/misc/1.gif It is actually PNG image even if it has gif extension. Regarding what function I should use this is not the point - I created simple test case to illustrate problem. In the real script it is used completely different way. ------------------------------------------------------------------------ [2006-12-08 20:02:35] [EMAIL PROTECTED] Please provide a working link to the image. ------------------------------------------------------------------------ [2006-12-08 20:02:21] [EMAIL PROTECTED] You really should be using the imagecreatefromgif() function in this instance. The URL with an image seems to be down, can you provide a working URL for the file please. ------------------------------------------------------------------------ [2006-12-08 18:33:46] [EMAIL PROTECTED] Pierre, is E_ERROR really required in this case? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39780 -- Edit this bug report at http://bugs.php.net/?id=39780&edit=1