Change language

PHP Image_type_to_mime_type () function

Syntax:
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 / vnd.microsoft.icon 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
Link: https://www.php.net/manual/en/function.image-type-to-mime-type.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () 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