title: How to delete transparent color in images?
body: <p>What is the best way to replace transparent colors with white in gif and png images with php?</p>
  
  <pre><code>// get transparent color indexes
  $trsp = ImageColorsForIndex($image, ImageColorTransparent($image));
  // get transparent color set
  $delete = imagecolorallocate($image, $trsp['red'], $trsp['green'], $trsp['blue']); 
  // replace
  imagecolorset($image, $delete, 255, 255, 255);
  </code></pre>
  
  <p>does not working.</p>