For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > August 2006 > #38560 [Asn->Opn]: imagejpeg doesn't output image when '' provided as filename









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #38560 [Asn->Opn]: imagejpeg doesn't output image when '' provided as filename
pajoye@php.net

2006-08-23, 7:58 am

ID: 38560
Updated by: pajoye@php.net
Reported By: doques at gmail dot com
-Status: Assigned
+Status: Open
-Bug Type: GD related
+Bug Type: Documentation problem
PHP Version: ?
Assigned To: pajoye
New Comment:

An empty string is an invalid path. If you want to output the image
directly and still change the default compression mode (3rd argument),
pass NULL:

imagejpeg($im, NULL, 60);

It could be added in the image* doc, but it is the way it works for any
other php function with many optional arguments back to doc problem.


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

[2006-08-23 09:55:54] tony2001@php.net

Which version are YOU using?

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

[2006-08-23 09:52:18] doques at gmail dot com

this is a doc problem. It must state that some versions of PHP (e.g.
prior to 4.3.9 or else) has a bug that doesn't allow to enter empty
string.

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

[2006-08-23 09:38:31] derick@php.net

Not a doc problem, so changing category to "GD related".

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

[2006-08-23 09:38:26] tony2001@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5.2-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.2-win32-latest.zip

Please try using this CVS snapshot:

http://snaps.php.net/php5.2-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.2-win32-latest.zip

Please try using this CVS snapshot:

http://snaps.php.net/php5.2-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce it.

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

[2006-08-23 08:52:07] doques at gmail dot com

Description:
------------
imagejpeg doesn't output image when '' provided as filename. PHP
warning is printed instead:
* warning: imagejpeg(): Invalid filename '' in
/var/www/html/htdocs/image.inc on line 310.

Documentation states that empty string can be provided and image will
be outputed to standart buffer.



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


--
Edit this bug report at http://bugs.php.net/?id=38560&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com