mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Add support for PNG images with alpha
This commit is contained in:
parent
1d832618a4
commit
7cc8c369cb
11 changed files with 215 additions and 70 deletions
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue