Req #54859 [Com]: GD: image* support for PHP streams
| From: | james dot cohen at gmail dot com | Date: | Sat, 25 Feb 2012 02:25:46 +0000 |
| Subject: | Req #54859 [Com]: GD: image* support for PHP streams | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167814@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54859&edit=1
ID: 54859
Comment by: james dot cohen at gmail dot com
Reported by: dziastinux at gmail dot com
Summary: GD: image* support for PHP streams
Status: Open
Type: Feature/Change Request
Package: GD related
Operating System: All
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Using output buffering you can capture the output to variables.
It's described in some comments to the documentation:
http://www.php.net/manual/en/function.imagepng.php#53021
Previous Comments:
------------------------------------------------------------------------
[2011-05-19 11:22:47] dziastinux at gmail dot com
Description:
------------
imagepng/imapgejpg/imagegd.. do not accept PHP streams as string parameter
('php://memory').
Test script:
---------------
$fileName = 'php://memory';
imagepng($image, $fileName);
$imageData = file_get_contents( $fileName );
Actual result:
--------------
Warning: imagepng() [function.imagepng]: Unable to open 'php://memory' for writing:
Invalid argument...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54859&edit=1