From 447bac077e88c1200f76c1e592f772e1190ec8a9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 26 Dec 2020 21:24:36 +0000 Subject: [PATCH] Simplify the resizing --- src/Module/Photo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Module/Photo.php b/src/Module/Photo.php index ca27406067..64d9e3542a 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -28,6 +28,7 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Photo as MPhoto; use Friendica\Util\Proxy; +use Friendica\Object\Image; /** * Photo Module @@ -112,7 +113,7 @@ class Photo extends BaseModule // if customsize is set and image is not a gif, resize it if ($photo['type'] !== "image/gif" && $customsize > 0 && $customsize < 501) { - $img = MPhoto::getImageForPhoto($photo); + $img = new Image($imgdata, $photo['type']); $img->scaleToSquare($customsize); $imgdata = $img->asString(); }