ID: 17528 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: GD related Operating System: Windows 98 (1st ed) PHP Version: 4.2.1 New Comment:
On trying to fulfill your request for a self-contained example, I discovered that I wasn't getting the entire image into the database (fopen() on Win32). I think that the imagecreatefromstring() function should be able to more robustly handle input. Now I have a different problem. The data string I am retrieving is a JPEG. The error message I get is: Warning: imagecreatefromstring: Passed data is not in 'WBMP' format in c:\www\mcsda\includes\class.image.php on line 16 Warning: Couldn't create GD Image Stream out of Data in c:\www\mcsda\includes\class.image.php on line 16 I know that my string is not in WBMP format. Is that the only format this function can take as input? Previous Comments: ------------------------------------------------------------------------ [2002-05-30 18:09:22] [EMAIL PROTECTED] Please provide a small, self-contained example (read: not database dependency) which reproduces the problem. ------------------------------------------------------------------------ [2002-05-30 10:30:06] [EMAIL PROTECTED] My machine is a Pentium 233MMX with 160 MB RAM. I have tested this with: Apache 1.3.24 AND 2.0.36 PHP 4.2.1 - php_gd.dll AND php_gd2.dll (only one at a time) Here is the code being executed: $query = "SELECT image, width, height FROM site_image"; $query .= " WHERE image_id=\"".$image_id."\";"; $result = mysql_query($query, $linkid); $rowarray = mysql_fetch_array($result, MYSQL_ASSOC); $old_image = imagecreatefromstring($rowarray["image"]); I know that it is the imagecreatefromstring() function causing the crash because when I remove it, the code doesn't work, but it doesn't crash either. I get the error: "This program has performed and illegal operation and will be shut down." These are the details: APACHE caused an invalid page fault in module PHP_GD2.DLL at 0197:017c1317. Registers: EAX=05095000 CS=0197 EIP=017c1317 EFLGS=00010246 EBX=00000000 SS=019f ESP=0195f7e8 EBP=0195f7f8 ECX=00000000 DS=019f ESI=007a6b50 FS=8b27 EDX=ffffe2ee ES=019f EDI=00000001 GS=0000 Bytes at CS:EIP: 8a 08 89 4d fc 8b 55 f0 83 c2 01 89 55 f0 33 c0 Stack dump: 05095000 ffffe2ee 006d78d0 00000000 0195f808 017c1dc9 0195f93c 000000da 0195f820 017d2b05 0195f93c 017d2f44 006d78b8 006d78d0 0195f834 017c05c6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17528&edit=1
