php-doc-en/reference/image/functions/imagejpeg.xml
Nuno Lopes 798b64cd27 fix : fix protos
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@161863 c90b9560-bf6c-de11-be94-00142212c4b1
2004-06-21 11:45:37 +00:00

76 lines
2.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.30 -->
<refentry id="function.imagejpeg">
<refnamediv>
<refname>imagejpeg</refname>
<refpurpose>Output image to browser or file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>imagejpeg</methodname>
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>quality</parameter></methodparam>
</methodsynopsis>
<para>
<function>imagejpeg</function> creates the
<acronym>JPEG</acronym> file in filename from the image
<parameter>image</parameter>. The <parameter>image</parameter> argument
is the return from the <function>imagecreate</function> function.
</para>
<para>
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
<function>header</function>, you can create a PHP script that
outputs JPEG images directly.
</para>
<note>
<para>
JPEG support is only available if PHP was compiled
against GD-1.8 or later.
</para>
</note>
<para>
<parameter>quality</parameter> 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).
</para>
<para>
If you want to output Progressive JPEGs, you need to set interlacing
on with <function>imageinterlace</function>.
</para>
<para>
See also
<function>imagepng</function>,
<function>imagegif</function>,
<function>imagewbmp</function>,
<function>imageinterlace</function> and
<function>imagetypes</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->