diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2012-06-07 17:42:13 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2012-06-07 17:42:13 +0200 |
commit | 7cc8c369cb6a01cffb58215966844b53794f32f4 (patch) | |
tree | 758fc647c3e5d6dc36ec62e8e34c4471b388f97d /include/network.php | |
parent | 1d832618a4340526092fce9e49f4580f767e1526 (diff) | |
download | volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.gz volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.bz2 volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.zip |
Add support for PNG images with alpha
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php index eeb2460d1..446413cd8 100644 --- a/include/network.php +++ b/include/network.php @@ -807,8 +807,11 @@ function scale_external_images($s,$include_link = true) { if(stristr($mtch[1],$hostname)) continue; $i = fetch_url($mtch[1]); + // guess mimetype from headers or filename + $type = guess_image_type($mtch[1],true); + if($i) { - $ph = new Photo($i); + $ph = new Photo($i, $type); if($ph->is_valid()) { $orig_width = $ph->getWidth(); $orig_height = $ph->getHeight(); |