ID: 38526 Updated by: [EMAIL PROTECTED] Reported By: l dot j dot peters at student dot utwente dot nl -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: WinXP (all os) PHP Version: 5.1.5 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. there is no imagestype function and imagecreatefromstring returns a GD resource, you can use it to export its content in any format supported by gd. Previous Comments: ------------------------------------------------------------------------ [2006-08-20 19:43:54] l dot j dot peters at student dot utwente dot nl Description: ------------ I use imagecreatefromstring to load a binary stream, which is probably a jpeg image (thumbnail). With imagesx and imagesy I can retrieve the width and height of the resource, but I cannot retrieve the imagetype or mimetype of the resource. As described in the imagecreatefromstring function documentation, the imagetype will be automatically detected if the build of PHP can support it. Maybe an imagestype function can retrieve the imagetype from an image resource? Reproduce code: --------------- <?php $data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl' . 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr' . 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r' . '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='; $data = base64_decode($data); $im = imagecreatefromstring($data); echo "width: ".imagesx ($im)."\n"; echo "height: ".imagesy ($im)."\n"; echo "type: ".imagestype ($im)."\n"; ?> Expected result: ---------------- width: 28 height: 28 type: 3 Actual result: -------------- width: 28 height: 18 PHP Fatal error: Call to undefined function imagestype() in %location%\- on line 11 Fatal error: Call to undefined function imagestype() in %location%\- on line 11 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38526&edit=1
