title: PHP GD text borders showing up incorrectly with transparency
body: <p>I have seen other questions about this and I've tried using Alpha and imagetruecolortopalette to fix it but no dice. What I'm trying to do is make a page like text.php?test=somethinghere and it produces an image like this:</p>
  
  <p><a href="http://davzy.com/screenshots/Sample_20String-20110809-101622.png" rel="nofollow">http://davzy.com/screenshots/Sample_20String-20110809-101622.png</a></p>
  
  <p>I want the background to be transparent, but as you can see there's still some red there:</p>
  
  <pre><code>&lt;?php
  // The text to draw width
  $text = $_GET['t'];
  $font = 'fontname.ttf';
  
  $width = imagettfbbox(7, 0, $font, $text);
  
  // Create the image
  $im = imagecreatetruecolor($width[2] - $width[0] + 2, 11);
  imagetruecolortopalette($im,false, 2);
  imageSaveAlpha($im,true);
  
  // Create some colors
  $white = imagecolorallocate($im, 255, 255, 255);
  $grey = imagecolorallocate($im, 108, 108, 108);
  $red = ImageColorAllocateAlpha($im, 255, 0, 0, 127);
  imagefill($im, 0, 0, $red);
  
  //draw borders
  imagettftext($im, 7, 0, 0, 8, $grey, $font, $text);
  imagettftext($im, 7, 0, 2, 8, $grey, $font, $text);
  imagettftext($im, 7, 0, 1, 7, $grey, $font, $text);
  imagettftext($im, 7, 0, 1, 9, $grey, $font, $text);
  
  //draw font
  imagettftext($im, 7, 0, 0, 7, $grey, $font, $text);
  imagettftext($im, 7, 0, 2, 7, $grey, $font, $text);
  imagettftext($im, 7, 0, 0, 9, $grey, $font, $text);
  imagettftext($im, 7, 0, 2, 9, $grey, $font, $text);
  
  // Add the text
  imagettftext($im, 7, 0, 1, 8, $white, $font, $text);
  
  //show
  header('Content-Type: image/png');
  imagepng($im);
  imagedestroy($im);
  ?&gt;
  </code></pre>