From 7cc8c369cb6a01cffb58215966844b53794f32f4 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 7 Jun 2012 17:42:13 +0200 Subject: Add support for PNG images with alpha --- include/network.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/network.php') 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(); -- cgit v1.2.3