aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.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 /include/user.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 'include/user.php')
-rw-r--r--include/user.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/user.php b/include/user.php
index af43a2b52..2477438bf 100644
--- a/include/user.php
+++ b/include/user.php
@@ -284,7 +284,11 @@ function create_user($arr) {
$filename = basename($photo);
$img_str = fetch_url($photo,true);
- $img = new Photo($img_str);
+ // guess mimetype from headers or filename
+ $type = guess_image_type($photo,true);
+
+
+ $img = new Photo($img_str, $type);
if($img->is_valid()) {
$img->scaleImageSquare(175);
@@ -324,4 +328,4 @@ function create_user($arr) {
$result['user'] = $u;
return $result;
-} \ No newline at end of file
+}