Added function to convert image type to mime type string
Slightly improved documentation.