Add support to render/save in alternate types.

Ran into a issue on a where I needed render to save as JPEG and noticed it only saves as PNG.

This pull request will allow people to save in the supported formats.