Код: Выделить всё
$trnprt_color = imagecolorsforindex($source, $trnprt_indx);
Код: Выделить всё
$trnprt_color = imagecolorsforindex($source, $trnprt_indx);
Код: Выделить всё
$trnprt_color = @imagecolorsforindex($source, $trnprt_indx);
Код: Выделить всё
if ($trnprt_indx
Код: Выделить всё
&& $trnpt_index < 255
Код: Выделить всё
if ($trnprt_indx >= 0&& $trnpt_ind < 255) //transparent
Код: Выделить всё
elseif ($this->extension == 'gif')
{
$source = imagecreatefromgif($this->destination_file);
$trnprt_indx = imagecolortransparent($source);
if ($trnprt_indx >= 0&& $trnpt_ind < 255) //transparent
{
$trnprt_color = @imagecolorsforindex($source, $trnprt_indx);
//$trnprt_color = imagecolorsforindex($source, $trnprt_indx);
$trnprt_indx = imagecolorallocate($destination, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);
imagefill($destination, 0, 0, $trnprt_indx);
imagecolortransparent($destination, $trnprt_indx);
}
Это штатный функционал. [beta] Editor of attachments (quoting, watermark)