<HTML ><HEAD ><TITLE >image_type_to_mime_type</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Image functions" HREF="ref.image.html"><LINK REL="PREVIOUS" TITLE="getimagesize" HREF="function.getimagesize.html"><LINK REL="NEXT" TITLE="image2wbmp" HREF="function.image2wbmp.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.getimagesize.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.image2wbmp.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.image-type-to-mime-type" ></A >image_type_to_mime_type</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN34252" ></A ><P > (PHP 4 >= 4.3.0)</P >image_type_to_mime_type -- Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype</DIV ><DIV CLASS="refsect1" ><A NAME="AEN34255" ></A ><H2 >Description</H2 >string <B CLASS="methodname" >image_type_to_mime_type</B > ( int imagetype)<BR ></BR ><P > The <B CLASS="function" >image_type_to_mime_type()</B > function will determine the Mime-Type for an IMAGETYPE constant. <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN34265" ></A ><P ><B >Example 1. image_type_to_mime_type (file)</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><?php header ("Content-type: ".image_type_to_mime_type (IMAGETYPE_PNG)); ?></PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ><P > <DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > This function does not require the GD image library. </P ><P > See also <A HREF="function.getimagesize.html" ><B CLASS="function" >getimagesize()</B ></A >, <A HREF="function.exif-imagetype.html" ><B CLASS="function" >exif_imagetype()</B ></A >, <A HREF="function.exif-read-data.html" ><B CLASS="function" >exif_read_data()</B ></A > and <A HREF="function.exif-thumbnail.html" ><B CLASS="function" >exif_thumbnail()</B ></A >. </P ></BLOCKQUOTE ></DIV > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.getimagesize.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.image2wbmp.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >getimagesize</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.image.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >image2wbmp</TD ></TR ></TABLE ></DIV ></BODY ></HTML >