php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54859 GD: image* support for PHP streams
Submitted: 2011-05-19 11:22 UTC Modified: 2012-02-25 10:32 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: dziastinux at gmail dot com Assigned:
Status: Closed Package: GD related
PHP Version: 5.3.6 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dziastinux at gmail dot com
New email:
PHP Version: OS:

 

 [2011-05-19 11:22 UTC] 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...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-20 23:52 UTC] felipe@php.net
-Type: Bug +Type: Feature/Change Request
 [2012-02-25 02:25 UTC] james dot cohen at gmail dot com
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
 [2012-02-25 10:32 UTC] dziastinux at gmail dot com
And this is the reason why it is feature request.
I found out it is impossible to implement memory stream support.
See: http://stackoverflow.com/questions/6917224/php-memory-php-temp-preserving-stream-data-on-subsequent-handle-creation
 [2012-02-25 10:32 UTC] dziastinux at gmail dot com
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 27 13:06:06 2022 UTC