mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
122 lines
3.2 KiB
XML
122 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.imageinterlace" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imageinterlace</refname>
|
|
<refpurpose>Enable or disable interlace</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imageinterlace</methodname>
|
|
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
|
|
<methodparam choice="opt"><type class="union"><type>bool</type><type>null</type></type><parameter>enable</parameter><initializer>&null;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imageinterlace</function> turns the interlace bit on or off.
|
|
</para>
|
|
<para>
|
|
If the interlace bit is set and the image is used as a <acronym>JPEG</acronym> image,
|
|
the image is created as a progressive <acronym>JPEG</acronym>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>enable</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
If &true;, the image will be interlaced, if &false; the interlace bit is turned off.
|
|
Passing &null; will result in the interlacing behavior not being changed.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns &true; if the interlace bit is set for the image, &false; otherwise.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.5</entry>
|
|
<entry>
|
|
<function>imageinterlace</function> returns a <type>bool</type> now;
|
|
previously it returned an <type>int</type>
|
|
(non-zero for interlaced images, zero otherwise).
|
|
</entry>
|
|
</row>
|
|
&gd.changelog.image-param;
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
<parameter>enable</parameter> expects a <type>bool</type> now;
|
|
previously it expected an <type>int</type>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Turn on interlacing using <function>imageinterlace</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Create an image instance
|
|
$im = imagecreatefromgif('php.gif');
|
|
|
|
// Enable interlancing
|
|
imageinterlace($im, true);
|
|
|
|
// Save the interlaced image
|
|
imagegif($im, './php_interlaced.gif');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|