<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<chapter xml:id="image.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.setup;

 <!-- {{{ Requirements -->
 <section xml:id="image.requirements">
  &reftitle.required;
  <para>
   If you have the <acronym>GD</acronym> library (available at <link
   xlink:href="&url.gd;">&url.gd;</link>) you will also be able to create
   and manipulate images.
  </para>
  <para>
   The format of images you are able to manipulate depend on the
   version of <acronym>GD</acronym> you install, and any other libraries
   <acronym>GD</acronym> might need to access those image formats.
   <note>
    <simpara>
     libgd-2.1.0 or higher is required. Alternatively, use
     the bundled <acronym>GD</acronym> library that ships with PHP.
    </simpara>
   </note>
   <note>
    <simpara>
     The <acronym>GD</acronym> library requires zlib &gt;= 1.2.0.4.
    </simpara>
   </note>
  </para>
  <para>
   You may wish to enhance <acronym>GD</acronym> to handle more image formats.
   <table>
   <title>Supported image formats</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Image format</entry>
       <entry>Library to download</entry>
       <entry>Notes</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry><literal>gif</literal></entry>
       <entry></entry>
       <entry></entry>
      </row>
      <row>
       <entry><literal>jpeg</literal></entry>
       <entry><link xlink:href="&url.jpeg;">&url.jpeg;</link></entry>
       <entry>
        When building the jpeg library (prior to building PHP) you
        must use the <option role="configure">--enable-shared</option>
        option in the configure step.  If you do not, you will receive
        an error saying <literal>libjpeg.(a|so) not found</literal>
        when you get to the configure step of building PHP.
       </entry>
      </row>
      <row>
       <entry><literal>png</literal></entry>
       <entry><link xlink:href="&url.libpng;">&url.libpng;</link></entry>
       <entry>
       </entry>
      </row>
      <row>
       <entry><literal>xpm</literal></entry>
       <entry><link xlink:href="&url.libxpm;">&url.libxpm;</link></entry>
       <entry>
        It's likely you have this library already available, if your system
        has an installed X-Environment.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>

  <para>
   You may wish to enhance <acronym>GD</acronym> to deal with different fonts.
   The <link xlink:href="&url.freetype;">FreeType 2</link> library is supported.
  </para>
 </section>
 <!-- }}} -->

 <!-- {{{ Installation -->
 &reference.image.configure;
 <!-- }}} -->

 <!-- {{{ Configuration -->
 &reference.image.ini;
 <!-- }}} -->

 <!-- {{{ Resources -->
 <section xml:id="image.resources">
  &reftitle.resources;
  <para>
   This extension defines the following resource types:
   <table>
   <title>List of resource types in GD</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>Description</entry>
       <entry>Notes</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry><literal>gd</literal></entry>
       <entry>Image resource, used by functions like <function>imagecreatefrompng</function></entry>
       <entry>Prior to PHP 8.0.0</entry>
      </row>
      <row>
       <entry><literal>gd font</literal></entry>
       <entry>Font resource internally created by <function>imageloadfont</function></entry>
       <entry>Prior to PHP 8.1.0</entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>
 </section>
 <!-- }}} -->

</chapter>

<!-- 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
-->

