Ver código fonte

extract transparency fix from #8050

tags/v8.0.0alpha1
Georg Ehrke 10 anos atrás
pai
commit
fa461befbc
1 arquivos alterados com 8 adições e 0 exclusões
  1. 8
    0
      lib/private/image.php

+ 8
- 0
lib/private/image.php Ver arquivo

@@ -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);

Carregando…
Cancelar
Salvar