aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-15 20:09:40 -0700
committerCash Costello <cash.costello@gmail.com>2012-06-15 20:09:40 -0700
commit15c0a0106be33711fe6b11e2c6acd2812d6e9bbe (patch)
treeb49a561ea35853b3d0bc38cc0dc6c8ee1a664213 /engine
parente6187c7266c98f24c1a2bd8a272b1cdce25f5964 (diff)
parent9607776966d5c0f8a132dd4275841298619907ea (diff)
downloadelgg-15c0a0106be33711fe6b11e2c6acd2812d6e9bbe.tar.gz
elgg-15c0a0106be33711fe6b11e2c6acd2812d6e9bbe.tar.bz2
Merge pull request #270 from mrclay/4577-png-transparency
Fixes #4577: Transparency converted to white instead of black
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/filestore.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index 86f6d9baa..93a127257 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -149,6 +149,12 @@ $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0, $upscale = FALSE) {
return FALSE;
}
+ // color transparencies white (default is black)
+ imagefilledrectangle(
+ $new_image, 0, 0, $params['newwidth'], $params['newheight'],
+ imagecolorallocate($new_image, 255, 255, 255)
+ );
+
$rtn_code = imagecopyresampled( $new_image,
$original_image,
0,