#45832 [Opn->Bgs]: Unable to write to user-defined stream by imagejpeg()

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45832
 Updated by:       [email protected]
 Reported By:      [email protected]
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Windows
 PHP Version:      5.2.6
 New Comment:

See bug #39263


Previous Comments:
------------------------------------------------------------------------

[2008-08-15 12:31:55] [email protected]

Description:
------------
Function imagejpeg() is not able to write to the user-defined stream.

[I think it is caused by the fact that _php_image_output_ctx() uses
VCWD_FOPEN() instead of php_stream_open_wrapper() - but I'm not an
expert.]

Reproduce code:
---------------
imagejpeg(imagecreatefromjpeg("x.jpg"), "var://myvar");

"var" protocol defined as an example in
http://www.php.net/stream_wrapper_register

Expected result:
----------------
Image successfully copied to the variable.

Actual result:
--------------
Warning: imagejpeg(): Unable to open 'var://myvar' for writing: Invalid
argument


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45832&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.