PHP Manual
This manual is provided as a courtesy. It is not an official source. Please check php.net for updated information.
(PHP 4 >= 4.3.0, PHP 5)
The image_type_to_mime_type() function will determine the Mime-Type for an IMAGETYPE constant.
Example 1. image_type_to_mime_type (file)
<?phpheader("Content-type: " . image_type_to_mime_type(IMAGETYPE_PNG));?>
The returned values are as follows
Table 1. Returned values Constants
Note: This function does not require the GD image library.
See also getimagesize(), exif_imagetype(), exif_read_data() and exif_thumbnail().