#41442 [Opn->Asn]: imagegd2 under output control
| From: | tony2001@php.net | Date: | Mon, 21 May 2007 08:39:59 +0000 |
| Subject: | #41442 [Opn->Asn]: imagegd2 under output control | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112890@lists.php.net to get a copy of this message | ||
ID: 41442
Updated by: tony2001@php.net
Reported By: rainer dot collet at gmx dot net
-Status: Open
+Status: Assigned
-Bug Type: Output Control
+Bug Type: GD related
Operating System: debian etch
PHP Version: 5.2.2
-Assigned To:
+Assigned To: pajoye
New Comment:
Pierre, check this patch out:
http://tony2001.phpclub.net/dev/tmp/bug41442.diff
Previous Comments:
------------------------------------------------------------------------
[2007-05-18 22:42:06] rainer dot collet at gmx dot net
Description:
------------
imagegd2 does not produce valid gd2 image if used under output control
Reproduce code:
---------------
$strBinary = file_get_contents('test.jpg');
$resHandle = imagecreatefromstring($strBinary);
ob_start();
imagegd2($resHandle);
$strBinary2 = ob_get_clean();
imagecreatefromstring($strBinary2);
>>>imagecreatefromstring($strBinary2) issues warning but following
works fine:
$strBinary = file_get_contents('test.jpg');
$resHandle = imagecreatefromstring($strBinary);
imagegd2($resHandle, 'test.gd2');
$strBinary2 = file_get_contents('test.gd2');
imagecreatefromstring($strBinary2);
Expected result:
----------------
nothing
Actual result:
--------------
second call to imagecreatefromstring issues
function.imagecreatefromstring: Passed data is not in 'GD2' format
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41442&edit=1