php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45832 Unable to write to user-defined stream by imagejpeg()
Submitted: 2008-08-15 12:31 UTC Modified: 2008-08-15 15:27 UTC
From: vrana@php.net Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.2.6 OS: Windows
Private report: No CVE-ID: None
 [2008-08-15 12:31 UTC] vrana@php.net
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-15 15:27 UTC] jani@php.net
See bug #39263
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 02:01:35 2024 UTC