Форум: Форум PHPФорум ApacheФорум Регулярные ВыраженияФорум MySQLHTML+CSS+JavaScriptФорум FlashРазное
Новые темы: 0000000
Программирование. Ступени успешной карьеры. Авторы: Кузнецов М.В., Симдянов И.В. Социальная инженерия и социальные хакеры. Авторы: Кузнецов М.В., Симдянов И.В. PHP 5/6. В подлиннике. Авторы: Кузнецов М.В., Симдянов И.В. PHP Puzzles. Авторы: Кузнецов М.В., Симдянов И.В. Объектно-ориентированное программирование на PHP. Авторы: Кузнецов М.В., Симдянов И.В.
ВСЕ НАШИ КНИГИ
Консультационный центр SoftTime

Форум PHP

Выбрать другой форум

 

Здравствуйте, Посетитель!

вид форума:
Линейный форум Структурный форум

тема: Наложение картинок
 
 автор: pissed   (13.07.2008 в 11:28)   письмо автору
 
 

при наложении png на png(прозрачность) возникает черный шум как избавиться от этого

$this->watermark = imagecreatefrompng($this->photo);
if($this->auto){$this->new_h=ceil(ImageSY($this->watermark)/(ImageSX($this->watermark)/$this->new_w));}
$this->dst_img = imagecreatetruecolor($this->new_w, $this->new_h);
$this->colorcount = imagecolorstotal($this->watermark);
imagepalettecopy($this->dst_img,$this->watermark);
$this->transparentcolor = imagecolortransparent($this->watermark);
imagefill($this->dst_img,0,0,$this->transparentcolor);
imagecolortransparent($this->dst_img,$this->transparentcolor);
imagecopyresampled($this->dst_img, $this->watermark, 0, 0, 0, 0,$this->new_w,$this->new_h, imagesx($this->watermark), imagesy($this->watermark));
if(isset($this->logo)){
$this->watermark = imagecreatefrompng($this->logo);
imagealphablending($this->watermark,true);
$this->gow=$this->new_w - imagesx($this->watermark);
$this->goh=$this->new_h - imagesy($this->watermark);
imagecopy($this->dst_img,$this->watermark,$this->gow,$this->goh,0,0,imagesx($this->watermark),imagesy($this->watermark));
}else{ImageCopyResized($this->dst_img,$this->watermark,$this->gow,$this->goh,0,0,$this->new_w,$this->new_h,ImageSX($this->watermark),ImageSY($this->watermark));}
if($this->new_file)$this->new_file.=".jpg";else$this->header();
imagejpeg($this->dst_img,$this->new_file,85);
imagedestroy($this->dst_img);

   
Rambler's Top100
вверх

Rambler's Top100 Яндекс.Метрика Яндекс цитирования