[eluser]Unknown[/eluser]
File
ystem/libraries/Image_lib.php Line:516
...
Code:
/* for PNG images*/
if ($this->image_library == 'gd2' AND $this->image_type == 3)
{
imagealphablending($dst_img, false);
$transparent = imagecolorallocatealpha($dst_img, 255, 255, 255, 127);
imagefilledrectangle($dst_img, 0, 0, $this->width, $this->height, $transparent);
imagesavealpha($dst_img,true);
}
/* for GIF images */
if ($this->image_library == 'gd2' AND $this->image_type == 1)
{
$transparent_index = imagecolortransparent($src_img);
if ($transparent_index >= 0)
{
$transparent_color = imagecolorsforindex($src_img, $transparent_index);
$transparent_index = imagecolorallocate($dst_img, $transparent_color['red'],
$transparent_color['green'],
$transparent_color['blue']);
imagefill($dst_img, 0, 0, $transparent_index);
imagecolortransparent($dst_img, $transparent_index);
}
}
...