From 15d9fc69cf77f3bd967ce444413b3b8422576e9a Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 9 Mar 2009 11:23:22 +0000 Subject: Icons are now correctly resized git-svn-id: https://code.elgg.org/elgg/trunk@3132 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/filestore.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engine/lib/filestore.php') diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index ee90e4b86..3832a0fec 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -769,7 +769,11 @@ $height = ($y2 - $y1); } }//else { - // Resize and return the image contents! + // Resize and return the image contents! + if ($square) { + $newheight = $maxheight; + $newwidth = $maxwidth; + } imagecopyresampled($newimage, $oldimage, 0,0,$widthoffset,$heightoffset,$newwidth,$newheight,$width,$height); //} -- cgit v1.2.3