By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

imagegd2

P: n/a
Hi,

I do not understand, why this does not work for me:

$strBinary = file_get_contents('test.jpg');
$resHandle = imagecreatefromstring($strBinary);
ob_start();
imagegd2($resHandle);
$strBinary2 = ob_get_clean();
imagecreatefromstring($strBinary2);

I get
>function.imagecreatefromstring: Passed data is not in 'GD2' format
for the second call of imagecreatefromstring

As check that my php is set up correctly i tried that and it worked:

$strBinary = file_get_contents('test.jpg');
$resHandle = imagecreatefromstring($strBinary);
imagegd2($resHandle, 'test.gd2');
$strBinary2 = file_get_contents('test.gd2');
imagecreatefromstring($strBinary2);

Can anybody tell me where the difference is and why the first version
does not work?

Thanks,
- Rainer Collet

May 17 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.