mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-18 14:08:01 +00:00
transparency on resized png's is now displayed correctly
This commit is contained in:
@@ -124,6 +124,10 @@ class Image
|
|||||||
ImageColorAllocate($newimg, $colors['red'], $colors['green'], $colors['blue']);
|
ImageColorAllocate($newimg, $colors['red'], $colors['green'], $colors['blue']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imagefill($newimg, 0, 0, IMG_COLOR_TRANSPARENT);
|
||||||
|
imagesavealpha($newimg,true);
|
||||||
|
imagealphablending($newimg, true);
|
||||||
|
|
||||||
imagecopyresized($newimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
|
imagecopyresized($newimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
|
||||||
|
|
||||||
$img = $newimg;
|
$img = $newimg;
|
||||||
|
|||||||
Reference in New Issue
Block a user