|  | 
  Andre Dörscheln - 2010-05-27 13:37:45Hello,
 First I have to say, that this is one of the best classes, I've found during the last 2 years. It's easy, fast and has a nice code.
 
 My problem is, that I want to add a transparent PNG image to another. When I try, the transparent sectors are black...
 
 wfg, André
  Tufan Baris YILDIRIM - 2010-05-28 05:44:51 - In reply to message 1 from Andre DörschelnHello Andre,First thanks.  can u show your code ?
  Andre Dörscheln - 2010-05-28 10:45:26 - In reply to message 2 from Tufan Baris YILDIRIMHello Tufan,
 These two lines are responsible for the adding of the second image:
 
 $im = new D3Image("file:./images/twittus_bg1.png;");
 $im->add(new D3Image("file:".$img), "left: 15px; top: 16px;");
 
 Andre
  Tufan Baris YILDIRIM - 2010-05-28 11:15:53 - In reply to message 3 from Andre DörschelnHello Andre,Thanks for your tests. add this function for resolve this problem.
 
 /**
 * use only for PNG images.
 */
 public function TurnOffBlending(){
 imagealphablending($this->image, false);
 imagesavealpha($this->image, true);
 return $this;
 return $this->forEditores();
 
 }
 
 
 
 and use as:
 
 $image=new D3Image('file:logo.png;');
 $image->TurnOffBlending();
 
 
 if you use resizing while using Add( transparency will not work.
 For Example :
 
 $im->add(new D3Image("file:".$img), "left: 15px; top: 16px;");  // this will  work.
 
 $im->add(new D3Image("file:".$img), "left: 15px; top: 16px;width:10px;height:20px"); // this will not.
 
 
 
 i will add this func on new version with some bug fixes.
 
 Regards.
  Andre Dörscheln - 2010-05-29 14:04:11 - In reply to message 4 from Tufan Baris YILDIRIMThank you for your quick reply.I'm very pleasant about seeing it work and your good support =)
 
 Andre
 |