diff options
author | kondou <kondou@ts.unde.re> | 2014-08-12 11:00:00 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2014-09-10 23:49:21 +0200 |
commit | 18ef7bf1edbb2046e473765cbc25eae3299590e9 (patch) | |
tree | 1ca4e07557c614427bf60b025ef410232d3d4871 /tests/lib/image.php | |
parent | 45b02f8f47e1f0b03430eb400198d2223c7561cf (diff) | |
download | nextcloud-server-18ef7bf1edbb2046e473765cbc25eae3299590e9.tar.gz nextcloud-server-18ef7bf1edbb2046e473765cbc25eae3299590e9.zip |
Preserve transparency when loading from a file
Fix #7148 - again :)
Diffstat (limited to 'tests/lib/image.php')
-rw-r--r-- | tests/lib/image.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/image.php b/tests/lib/image.php index 131a9d86f3e..795bc464159 100644 --- a/tests/lib/image.php +++ b/tests/lib/image.php @@ -115,6 +115,9 @@ class Test_Image extends PHPUnit_Framework_TestCase { public function testData() { $img = new \OC_Image(OC::$SERVERROOT.'/tests/data/testimage.png'); $raw = imagecreatefromstring(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.png')); + // Preserve transparency + imagealphablending($raw, true); + imagesavealpha($raw, true); ob_start(); imagepng($raw); $expected = ob_get_clean(); |