I'm using PHP 5 GD Lib to do some graphic manipulations, and I can't find a way to get around the black background that shows up when you rotate an image or copy an image to another (larger) image.
Assuming that I am working with a jpeg file, which of course is not transparent, how can I rotate the image using gd lib and end up with a white background / canvas, rather than black background?