Posted by rain_c1 on 05/17/07 23:24
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
[Back to original message]
|