ID: 51063 Updated by: paj...@php.net Reported By: bfra...@php.net -Status: Open +Status: Assigned Bug Type: Feature/Change Request PHP Version: 5.3.1 -Assigned To: +Assigned To: pajoye New Comment:
Will apply it shortly after review (probably this WE). However it looks good already, thanks :) Previous Comments: ------------------------------------------------------------------------ [2010-02-17 03:59:22] bfra...@php.net Here is a test for the new function: http://www.brianfrance.com/software/php/getimagesizefromstring/001.phpt and the required test.gif (php logo image): http://static.php.net/www.php.net/images/php.gif ------------------------------------------------------------------------ [2010-02-16 21:54:26] bfra...@php.net Description: ------------ It would be nice to be able to pass in a string to getimagesize. Here is a patch that takes the original getimagesize function and turns it into php_getimagesize_from_stream. Then getimagesize and a new function getimagesizefromstring can use the function once a stream is created. http://www.brianfrance.com/software/php/getimagesizefromstring.diff Reproduce code: --------------- <?PHP $img = 'test.gif'; var_dump(getimagesize($img)); $data = file_get_contents($img); var_dump(getimagesizefromstring($data)); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51063&edit=1