Saves an image to file.
The file extension is used to determine to image format. Currently, only the BMP (.bmp) format is supported.