aboutsummaryrefslogtreecommitdiffstats
path: root/mod/parse_url.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-07 15:44:56 -0700
committerfriendica <info@friendica.com>2012-06-07 15:44:56 -0700
commitf4a80fcf2474a13b2d733f59f1a928b40841d83c (patch)
tree27c32cdfbaa3a63877b118609b5177c705ff747a /mod/parse_url.php
parentfcf8f301e595444620f07ea0e01994ea99ee961b (diff)
parent2438c6e45d47ca194b51f99ddf113112fbb6ccb9 (diff)
downloadvolse-hubzilla-f4a80fcf2474a13b2d733f59f1a928b40841d83c.tar.gz
volse-hubzilla-f4a80fcf2474a13b2d733f59f1a928b40841d83c.tar.bz2
volse-hubzilla-f4a80fcf2474a13b2d733f59f1a928b40841d83c.zip
Merge pull request #328 from fabrixxm/master
PNG with alpha channel
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);