PHP: image_type_to_mime_type - Manual in Deutsh
PHP: image_type_to_mime_type - Manual in French
PHP: image_type_to_mime_type - Manual in Polish

You Are At PHP: image_type_to_mime_type - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

image_type_to_mime_type

(PHP 4 >= 4.3.0, PHP 5)

image_type_to_mime_type -- Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype

Description

string image_type_to_mime_type ( int imagetype )

The image_type_to_mime_type() function will determine the Mime-Type for an IMAGETYPE constant.

Parameters

imagetype

One of the IMAGETYPE_XXX constants

Return Values

The returned values are as follows

Table 1. Returned values Constants

imagetypeReturned value
IMAGETYPE_GIFimage/gif
IMAGETYPE_JPEGimage/jpeg
IMAGETYPE_PNGimage/png
IMAGETYPE_SWFapplication/x-shockwave-flash
IMAGETYPE_PSDimage/psd
IMAGETYPE_BMPimage/bmp
IMAGETYPE_TIFF_II (intel byte order)image/tiff
IMAGETYPE_TIFF_MM (motorola byte order) image/tiff
IMAGETYPE_JPCapplication/octet-stream
IMAGETYPE_JP2image/jp2
IMAGETYPE_JPXapplication/octet-stream
IMAGETYPE_JB2application/octet-stream
IMAGETYPE_SWCapplication/x-shockwave-flash
IMAGETYPE_IFFimage/iff
IMAGETYPE_WBMPimage/vnd.wap.wbmp
IMAGETYPE_XBMimage/xbm

Examples

Example 1. image_type_to_mime_type (file)

<?php
header
("Content-type: " . image_type_to_mime_type(IMAGETYPE_PNG));
?>

Notes

Note: This function does not require the GD image library.

See Also

getimagesize()
exif_imagetype()
exif_read_data()
exif_thumbnail()

Internet
Szkolenia to norma dla każdego. Norma dla każdego.
zegarki szwajcarskie
Skuteczne pozycjonowanie stron katowice i cała Polska.
Pomoc drogowa 24h

Another Useful functions:


ref.image | haru.haruimage | function.ps-place-image | function.ps-open-memory-image | function.ps-open-image | function.ps-open-image-file | function.ps-close-image | function.pdf-place-image | function.pdf-open-memory-image | function.pdf-open-image | function.pdf-open-image-file | function.pdf-load-image | function.pdf-get-image-width | function.pdf-get-image-height | function.pdf-fit-image | function.pdf-fill-imageblock | function.pdf-close-image | function.imagick-writeimages | function.imagick-writeimage | function.imagick-set-image-quality | function.imagick-set-image-comment | function.imagick-readimage | function.imagick-newimagelist | function.imagick-ispaletteimage | function.imagick-isopaqueimage | function.imagick-ismonochromeimage | function.imagick-isimagesequal | function.imagick-isgrayimage | function.imagick-image2blob | function.imagick-getimagetype | function.imagick-getimagefromlist | function.imagick-getimagedepth | function.imagick-blob2image | function.imagexbm | function.imagewbmp | function.imagetypes | function.imagettftext | function.imagettfbbox | function.imagetruecolortopalette | function.imagesy | function.imagesx | function.imagestringup | function.imagestring | function.imagesettile | function.imagesetthickness | function.imagesetstyle | function.imagesetpixel | function.imagesetbrush | function.imagesavealpha | function.imagerotate | function.imagerectangle | function.imagepstext | function.imagepsslantfont | function.imagepsloadfont | function.imagepsfreefont | function.imagepsextendfont | function.imagepsencodefont | function.imagepsbbox | function.imagepolygon | function.imagepng | function.imagepalettecopy | function.imageloadfont | function.imageline | function.imagelayereffect | function.imagejpeg | function.imageistruecolor | function.imageinterlace | function.imagegif | function.imagegd2 | function.imagegd | function.imagegammacorrect | function.imagefttext | function.imageftbbox | function.imagefontwidth | function.imagefontheight | function.imagefilter | function.imagefilltoborder | function.imagefilledrectangle | function.imagefilledpolygon | function.imagefilledellipse | function.imagefilledarc | function.imagefill | function.imageellipse | function.imagedestroy | function.imagedashedline | function.imagecreatetruecolor | function.imagecreatefromxpm | function.imagecreatefromxbm | function.imagecreatefromwbmp | function.imagecreatefromstring | function.imagecreatefrompng | function.imagecreatefromjpeg | function.imagecreatefromgif | function.imagecreatefromgd2part | function.imagecreatefromgd2 | function.imagecreatefromgd | function.imagecreate | function.imagecopyresized | function.imagecopyresampled | function.imagecopymergegray | function.imagecopymerge | function.imagecopy | function.imageconvolution | function.imagecolortransparent | function.imagecolorstotal | function.imagecolorsforindex | function.imagecolorset | function.imagecolorresolvealpha | function.imagecolorresolve | function.imagecolormatch | function.imagecolorexactalpha | function.imagecolorexact | function.imagecolordeallocate | function.imagecolorclosesthwb | function.imagecolorclosestalpha | function.imagecolorclosest | function.imagecolorat | function.imagecolorallocatealpha | function.imagecolorallocate | function.imagecharup | function.imagechar | function.imagearc | function.imageantialias | function.imagealphablending | function.image2wbmp | function.image-type-to-mime-type | function.image-type-to-extension | function.harupage-drawimage | function.haruimage-setmaskimage | function.haruimage-setcolormask | function.haruimage-getwidth | function.haruimage-getsize | function.haruimage-getheight | function.haruimage-getcolorspace | function.haruimage-getbitspercomponent | function.getimagesize | function.exif-imagetype | function.cpdf-place-inline-image |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.