I can generate a dynamic image using PHP and GD but I don't want the script to have to do this everytime because it's not too good for the server load. Instead, I want to generate the image once and then save a static copy of it. How exactly can I save the image to a file after I've dynamically created it?