I am working with PHP 5.3/5.4 and GD.
I have used the following code to create an image canvas:
$col = imagecreatetruecolor($width, $height);
$bg = ImageColorAllocate($col, 42, 208, 77);
After I do this, I do some drawing. This all works just fine.
However, once I am finished, I need to 'erase' a certain percentage of the top of the image.
Once I have determined the area to be 'erased', how can I erase so that only the background is left? (or erase the background too would be fine)