Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

imagecreatefromstring() usage

Status
Not open for further replies.

sonnysavage

Programmer
May 29, 2002
130
US
My setup:
Apache 1.3.24 and 2.0.36
PHP 4.2.1
MySQL 3.23.47

Has anyone used imagecreatefromstring()? The PHP manual is pretty scarce on information:

I am trying to load a JPEG image from a MySQL table. From my understaning, this function is supposed to take many image types. I keep getting this error:
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
 
Judging from the error, I'd posit that the function expects a graphic in Windows bitmap format, not JPEG
 
WBMP images are for web-enabled hand-held devices like PDA's and cell phones. They are currently only displayed in black and white (monocrome).

WBMP support was just added to imagecreatefromstring() in PHP version 4.2.1. You can find it in the changelog.

I've reported it as a possible bug on the PHP site, but I was wondering if anyone else had used the function and knew of any tricks, tweaks, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top