php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46951 GD ext need to support streams
Submitted: 2008-12-27 07:37 UTC Modified: 2015-05-07 18:49 UTC
Votes:7
Avg. Score:5.0 ± 0.0
Reproduced:6 of 7 (85.7%)
Same Version:3 (50.0%)
Same OS:3 (50.0%)
From: syncer at gmail dot com Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: 5.3.0alpha3 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: syncer at gmail dot com
New email:
PHP Version: OS:

 

 [2008-12-27 07:37 UTC] syncer at gmail dot com
Description:
------------
PHP has wide support for Streams, Please add stream support for GD output functions imagegif(), imagepng(), imagewbmp(), imagejpeg() 

There is a work around with ob_buffer system and then out to stream resource but why not to be native supported.

Thanks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 20:48 UTC] jani@php.net
-Package: Feature/Change Request +Package: GD related
 [2011-06-08 00:27 UTC] stas@php.net
-Type: Feature/Change Request +Type: Bug
 [2011-06-08 00:27 UTC] stas@php.net
I think it's a bug - GD functions should work with streams as other functions 
using files do. Test case:

<?
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  'A Simple Text String', $text_color);

// Save the image as 'simpletext.jpg'
var_dump(imagejpeg($im, "php://stdout"));

returns false and does not output what it needs to.
 [2015-05-07 18:49 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2015-05-07 18:49 UTC] cmb@php.net
This issue is already fixed in recent PHP versions (at least as of
PHP 5.4.19).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 13:01:28 2025 UTC