Req #44239 [Opn->Csd]: getimagesize should be able to work on string data as well...
Edit report at https://bugs.php.net/bug.php?id=44239&edit=1
ID: 44239
Updated by: cmb@php.net
Reported by: npeelman at cfl dot rr dot com
Summary: getimagesize should be able to work on string data
as well...
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: GetImageSize related
Operating System: n/a
PHP Version: 5.1.6
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
As of PHP 5.4.0 there is getimagesizefromstring() which makes this
possible.
Previous Comments:
------------------------------------------------------------------------
[2008-02-25 23:22:55] npeelman at cfl dot rr dot com
Ok, I found the example for using streams with variables and it works just fine with getimagesize
but, I still think it would be easy enough for getimagesize to simply work on the string variable
should the attempt to open a filename fails.
------------------------------------------------------------------------
[2008-02-25 04:02:38] npeelman at cfl dot rr dot com
Description:
------------
Any reason why getimagesize couldn't be extended to accept image data in string format such
as:
array getimagesize (string $filename | string $string [, array &$imageinfo])
This would be very handy for pulling image info from data stored in cache (such as APC) or BLOB
data from a database without first converting with imagecreatefromstring() -> temp file ->
getimagesize($temp_file).
I see BUG #25507 but no example is given on how to achieve it. It seems to me that the binary data
in the string variable is already in the format needed.
I'm actually on PHP version 5.1.6 (ubuntu linux) as per phpinfo().
Thank you for your time,
Norman Peelman
Reproduce code:
---------------
n/a
Expected result:
----------------
n/a
Actual result:
--------------
n/a
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=44239&edit=1
Thread (3 messages)