Rotate An Image With ImageMagick
Code
# white (or possibly black) background
# transparent background
# black background
Rotates the image 45 degrees clockwise
Rotates the image in place (i.e. it updates the file)
Expands the canvas to cover the points which extend out on the rotate
Puts a white background on area that is expanded