mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:00:16 +00:00
Hopefully fix "Interlace handling should be turned on when using png_read_image"
This commit is contained in:
parent
364a5e99db
commit
c56b915dee
1 changed files with 3 additions and 0 deletions
|
@ -175,6 +175,7 @@ class Image
|
||||||
$this->valid = true;
|
$this->valid = true;
|
||||||
imagealphablending($this->image, false);
|
imagealphablending($this->image, false);
|
||||||
imagesavealpha($this->image, true);
|
imagesavealpha($this->image, true);
|
||||||
|
imageinterlace($this->image, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -543,6 +544,7 @@ class Image
|
||||||
$dest = imagecreatetruecolor($dest_width, $dest_height);
|
$dest = imagecreatetruecolor($dest_width, $dest_height);
|
||||||
imagealphablending($dest, false);
|
imagealphablending($dest, false);
|
||||||
imagesavealpha($dest, true);
|
imagesavealpha($dest, true);
|
||||||
|
imageinterlace($dest, true);
|
||||||
|
|
||||||
if ($this->type=='image/png') {
|
if ($this->type=='image/png') {
|
||||||
imagefill($dest, 0, 0, imagecolorallocatealpha($dest, 0, 0, 0, 127)); // fill with alpha
|
imagefill($dest, 0, 0, imagecolorallocatealpha($dest, 0, 0, 0, 127)); // fill with alpha
|
||||||
|
@ -612,6 +614,7 @@ class Image
|
||||||
$dest = imagecreatetruecolor($max, $max);
|
$dest = imagecreatetruecolor($max, $max);
|
||||||
imagealphablending($dest, false);
|
imagealphablending($dest, false);
|
||||||
imagesavealpha($dest, true);
|
imagesavealpha($dest, true);
|
||||||
|
imageinterlace($dest, true);
|
||||||
if ($this->type=='image/png') {
|
if ($this->type=='image/png') {
|
||||||
imagefill($dest, 0, 0, imagecolorallocatealpha($dest, 0, 0, 0, 127)); // fill with alpha
|
imagefill($dest, 0, 0, imagecolorallocatealpha($dest, 0, 0, 0, 127)); // fill with alpha
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue