Change language

PHP Image_type_to_mime_type () function

string image_type_to_mime_type (int $imagetype)
Parameters:This function takes one parameter $imagetype,which contains the integer value of IMAGETYPE_XXX constants like IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, etc.Return Values:This function returns a Mime string for the given IMAGETYPE constant.Below is an exhaustive list of all return values. imagetype Return value 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 (intel byte order) image / tiff IMAGETYPE_TIFF_MM (motorola byte order) image/tiffIMAGETYPE_JPCapplication/octet-stream IMAGETYPE_JP2 image / jp2 IMAGETYPE_JPX application / octet-stream IMAGETYPE_JB2 application/octet-streamIMAGETYPE_SWCapplication/x-shockwave-flash IMAGETYPE_IFF image / iff IMAGETYPE_WBMP image / vnd.wap.wbmp < / tr> IMAGETYPE_XBM image / xbm IMAGETYPE_ICO image / IMAGETYPE_WEBP image / webp The following programs illustrate the image_type_to_mime_type() function in PHP:Program 1: echo image_type_to_mime_type (IMAGETYPE_PNG); ?> Output:
image / png
Program 2: echo image_type_to_mime_type (IMAGETYPE_JPEG); ?>Output:
image / jpeg


Best laptop for Sims 4


Best laptop for Zoom


Best laptop for Minecraft


Best laptop for engineering student


Best laptop for development


Best laptop for Cricut Maker


Best laptop for hacking


Best laptop for Machine Learning


Latest questions


psycopg2: insert multiple rows with one query

12 answers


How to convert Nonetype to int or string?

12 answers


How to specify multiple return types using type-hints

12 answers


Javascript Error: IPython is not defined in JupyterLab

12 answers


Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method