Jump to content

This code is making it purple..


Gayner

Recommended Posts

if($transparent_background)
{
  $replace_these_colors_arr = array(12146130, 12211410, 12146130, 12211410, 12145874, 12211411, 12211666, 12145875, 12146131);

  for($x = 0; $x < $avatar_width; $x++) 
  {
    for($y = 0; $y < $avatar_height; $y++)
    {
      $color_index = imagecolorat($avatar, $x, $y);

      if(in_array($color_index, $replace_these_colors_arr))
      {
        imageSetPixel($avatar, $x, $y, $color_to_be_transparent );
      }  
    }
  }    
} 

 

I have no idea but whenever I save my image, it makes it have a purple outline like this:

 

24dfxq8.jpg

 

Any ideas on how to make it no purple outline on all the images?

 

I tryed to remove it all, but then this happens:

 

2ylsoqf.jpg

Link to comment
https://forums.phpfreaks.com/topic/175427-this-code-is-making-it-purple/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.