Skip to content
Snippets Groups Projects
Commit 5b11a18d authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt
Browse files

Merge pull request #10044 from owncloud/transparency_fix

extract transparency fix from #8050
parents 521934ee fa461bef
No related branches found
No related tags found
No related merge requests found
......@@ -870,6 +870,14 @@ class OC_Image {
imagedestroy($process);
return false;
}
// preserve transparency
if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) {
imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127));
imagealphablending($process, false);
imagesavealpha($process, true);
}
imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h);
if ($process == false) {
OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$w.'x'.$h, OC_Log::ERROR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment