PHP image_type_to_mime_type - Retorna o tipo de imagem MIME
image2wbmp - fez getimagesize, exif_read_data, exif_thumbnail, exif_imagetype voltou tipo de imagem dos tipos MIME.
gramática
string image_type_to_mime_type ( int $imagetype )
função image_type_to_mime_type () pode determinar um tipo Imagetype MIME constante.
Exemplos
<?php header("Content-type: " . image_type_to_mime_type(IMAGETYPE_PNG)); ?>
O valor de retorno é a seguinte:
tipo de imagem ( imagetype ) | Valor de retorno |
---|---|
IMAGETYPE_GIF | image / gif |
IMAGETYPE_JPEG | image / jpeg |
IMAGETYPE_PNG | image / png |
IMAGETYPE_SWF | application / x-shockwave-flash |
IMAGETYPE_PSD | image / psd |
IMAGETYPE_BMP | image / bmp |
IMAGETYPE_TIFF_II (o byte intel da Ordem) | image / tiff |
IMAGETYPE_TIFF_MM (motorola byte da Ordem) | image / tiff |
IMAGETYPE_JPC | application / octet-stream |
IMAGETYPE_JP2 | image / jp2 |
IMAGETYPE_JPX | application / octet-stream |
IMAGETYPE_JB2 | application / octet-stream |
IMAGETYPE_SWC | application / x-shockwave-flash |
IMAGETYPE_IFF | image / sse |
IMAGETYPE_WBMP | image / vnd.wap.wbmp |
IMAGETYPE_XBM | image / XBM |