PHP image_type_to_mime_type - Devuelve el tipo de imagen MIME
Image2WBMP - getimagesize hecho, exif_read_data, exif_thumbnail, exif_imagetype regresó tipo de imagen de tipos MIME.
gramática
string image_type_to_mime_type ( int $imagetype )
image_type_to_mime_type función () puede determinar una constante de tipo MIME ImageType.
Ejemplos
<?php header("Content-type: " . image_type_to_mime_type(IMAGETYPE_PNG)); ?>
El valor de retorno es el siguiente:
tipo de imagen ( imagetype ) | Valor de retorno |
---|---|
IMAGETYPE_GIF | image / gif |
IMAGETYPE_JPEG | image / jpeg |
IMAGETYPE_PNG | image / png |
IMAGETYPE_SWF | application / x-shockwave-flash |
IMAGETYPE_PSD | Imagen / psd |
IMAGETYPE_BMP | imagen / bmp |
IMAGETYPE_TIFF_II (el byte de Intel la Orden) | imagen / tiff |
IMAGETYPE_TIFF_MM (Motorola byte de la Orden) | imagen / tiff |
IMAGETYPE_JPC | application / octet-stream |
IMAGETYPE_JP2 | Imagen / JP2 |
IMAGETYPE_JPX | application / octet-stream |
IMAGETYPE_JB2 | application / octet-stream |
IMAGETYPE_SWC | application / x-shockwave-flash |
IMAGETYPE_IFF | Imagen / si y sólo si |
IMAGETYPE_WBMP | Imagen / vnd.wap.wbmp |
IMAGETYPE_XBM | Imagen / xbm |