<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >imagejpeg</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual PHP" HREF="index.html"><LINK REL="UP" TITLE="Image Functions" HREF="ref.image.html"><LINK REL="PREVIOUS" TITLE="imageistruecolor" HREF="function.imageistruecolor.html"><LINK REL="NEXT" TITLE="imagelayereffect" HREF="function.imagelayereffect.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-2"></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" >Manual PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.imageistruecolor.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.imagelayereffect.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.imagejpeg" ></A >imagejpeg</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN40303" ></A ><P > (PHP 3>= 3.0.16, PHP 4 , PHP 5)</P >imagejpeg -- Output image to browser or file</DIV ><DIV CLASS="refsect1" ><A NAME="AEN40306" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >imagejpeg</B > ( resource image [, string filename [, int quality]])<BR ></BR ><P > <B CLASS="function" >imagejpeg()</B > creates the <ACRONYM CLASS="acronym" >JPEG</ACRONYM > file in filename from the image <VAR CLASS="parameter" >image</VAR >. The <VAR CLASS="parameter" >image</VAR > argument is the return from the <A HREF="function.imagecreate.html" ><B CLASS="function" >imagecreate()</B ></A > function. </P ><P > The filename argument is optional, and if left off, the raw image stream will be output directly. To skip the filename argument in order to provide a quality argument just use an empty string (''). By sending an image/jpeg content-type using <A HREF="function.header.html" ><B CLASS="function" >header()</B ></A >, you can create a PHP script that outputs JPEG images directly. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Notã: </B > JPEG support is only available if PHP was compiled against GD-1.8 or later. </P ></BLOCKQUOTE ></DIV ><P > <VAR CLASS="parameter" >quality</VAR > is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75). </P ><P > If you want to output Progressive JPEGs, you need to set interlacing on with <A HREF="function.imageinterlace.html" ><B CLASS="function" >imageinterlace()</B ></A >. </P ><P > See also <A HREF="function.imagepng.html" ><B CLASS="function" >imagepng()</B ></A >, <A HREF="function.imagegif.html" ><B CLASS="function" >imagegif()</B ></A >, <A HREF="function.imagewbmp.html" ><B CLASS="function" >imagewbmp()</B ></A >, <A HREF="function.imageinterlace.html" ><B CLASS="function" >imageinterlace()</B ></A > and <A HREF="function.imagetypes.html" ><B CLASS="function" >imagetypes()</B ></A >. </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.imageistruecolor.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Acasã</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.imagelayereffect.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >imageistruecolor</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.image.html" ACCESSKEY="U" >Sus</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >imagelayereffect</TD ></TR ></TABLE ></DIV ></BODY ></HTML >