summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Avatar.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/Avatar.php b/classes/Avatar.php
index 05a5ee8ef..901c47c51 100644
--- a/classes/Avatar.php
+++ b/classes/Avatar.php
@@ -42,9 +42,10 @@ class Avatar extends Memcached_DataObject
$image_s = imagecreatetruecolor($size, $size);
$image_a = $this->to_image();
-
$square = min($this->width, $this->height);
-
+ imagecolortransparent($image_s, imagecolorallocate($image_s, 0, 0, 0));
+ imagealphablending($image_s, false);
+ imagesavealpha($image_s, true);
imagecopyresampled($image_s, $image_a, 0, 0, 0, 0,
$size, $size, $square, $square);