Bug #71517 [NEW]: getimagesize doesn't get width or height of svg
| From: | captlid at yahoo dot com | Date: | Wed, 03 Feb 2016 17:35:40 +0000 |
| Subject: | Bug #71517 [NEW]: getimagesize doesn't get width or height of svg | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199029@lists.php.net to get a copy of this message | ||
From: captlid at yahoo dot com
Operating system: windows 8.1 pro and linux
PHP version: Irrelevant
Package: GetImageSize related
Bug Type: Bug
Bug description:getimagesize doesn't get width or height of svg
Description:
------------
---
From manual page: http://www.php.net/function.getimagesize
---
The width and height for svg files is not outputting. Tested on windows
8.1, 7, xp professional versions, which ever linux godaddy runs on, php
versions 5.4.1.4, apache server 2
All software is 64 bit.
Test script:
---------------
<?
$size = getimagesize("black150.svg");
echo $size[0]. ' ' .$size[1];
?>
<img src="black150.svg" width="<?=$size[0]?>"
height="<?=$size[1]?>">
The svg file for reference
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="500" height="150">
<rect width="500" height="150"
style="fill:black;stroke-width:0px;stroke:blue;" />
<text text-anchor="middle" y="5" fill="white"
style="font-size:18pt;font-weight:bolder !important; font-family:times
new roman">
Sample text, just for demonstration purposes
</text>
</svg>
Expected result:
----------------
the width and height of the image
output:
150 500
Actual result:
--------------
nothing shows.
--
Edit bug report at https://bugs.php.net/bug.php?id=71517&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71517&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71517&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71517&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71517&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71517&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71517&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71517&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71517&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71517&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71517&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71517&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71517&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71517&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71517&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71517&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71517&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71517&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71517&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71517&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71517&r=mysqlcfg