Here my function do clear all problems. With this, you can draw firstly smooth lines (basic code adapted from code_couturier at graffiti dot net, with some performance changes). The special is, you can define the alpha-value of the line (0 = normal smooth line, 127 = fully transparent). Change whatever you want to make it better, but post your results ;)

<?php// An easy bit of code showing how you can use the ImageLine() function to create gradients

// Create An Image 255x255$img = ImageCreateTrueColor(255, 255);

$plotD = 0;while($plotD < 256){// Draw a line and move it down and make it lighter to get the gradient effectImageLine($img, 0, $plotD , 255, $plotD, ImageColorAllocate($img, $plotD, $plotD, $plotD));$plotD++;}Header("Content-type: image/png");ImagePng($img);ImageDestroy($img);?>