aboutsummaryrefslogtreecommitdiffstats
path: root/mod/parse_url.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-06-07 17:42:13 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2012-06-07 17:42:13 +0200
commit7cc8c369cb6a01cffb58215966844b53794f32f4 (patch)
tree758fc647c3e5d6dc36ec62e8e34c4471b388f97d /mod/parse_url.php
parent1d832618a4340526092fce9e49f4580f767e1526 (diff)
downloadvolse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.gz
volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.bz2
volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.zip
Add support for PNG images with alpha
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r--mod/parse_url.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php
index 27dac4d5d..cdf2223a8 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -215,8 +215,11 @@ function parse_url_content(&$a) {
$i = fetch_url($image);
if($i) {
+ // guess mimetype from headers or filename
+ $type = guess_image_type($image,true);
+
require_once('include/Photo.php');
- $ph = new Photo($i);
+ $ph = new Photo($i, $type);
if($ph->is_valid()) {
if($ph->getWidth() > 300 || $ph->getHeight() > 300) {
$ph->scaleImage(300);