<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/image.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'image.installation.php',
    1 => 'Встановлення',
    2 => 'Встановлення',
  ),
  'up' => 
  array (
    0 => 'image.setup.php',
    1 => 'Встановлення/налаштування',
  ),
  'prev' => 
  array (
    0 => 'image.requirements.php',
    1 => 'Вимоги',
  ),
  'next' => 
  array (
    0 => 'image.configuration.php',
    1 => 'Налаштування під час виконання',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/image/configure.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="image.installation" class="section">
 <h2 class="title">Встановлення</h2>
 <p class="para">
  To enable GD-support configure PHP
  <strong class="option configure">--with-gd[=DIR]</strong>, where DIR is the GD base
  install directory. To use the recommended bundled version of the GD library,
  use the configure option
  <strong class="option configure">--with-gd</strong>.
  GD library requires <span class="productname">libpng</span> and
  <span class="productname">libjpeg</span> to compile.
  As of PHP 7.4.0, <strong class="option configure">--with-gd</strong> becomes
  <strong class="option configure">--enable-gd</strong> (whether to enable the
  extension at all) and <strong class="option configure">--with-external-gd</strong>
  (to opt into using an external <span class="productname">libgd</span>, rather than
  the bundled one).
 </p>
 <p class="para">
  In Windows, you&#039;ll include the GD DLL <var class="filename">php_gd.dll</var> as
  an extension in <var class="filename">php.ini</var>.
  Prior to PHP 8.0.0, the DLL was named <var class="filename">php_gd2.dll</var>.
 </p>

 <p class="para">
  Enhance the capabilities of GD to handle more image formats by specifying
  the <code class="literal">--with-XXXX</code> configure switch to your PHP configure
  line.
  <table class="doctable table">
   <caption><strong>Supported image formats</strong></caption>
   
    <thead>
     <tr>
      <th>Image Format</th>
      <th>Configure Switch</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><code class="literal">avif</code></td>
      <td>
       To enable support for avif add
       <strong class="option configure">--with-avif</strong>.
       Available as of PHP 8.1.0.
      </td>
     </tr>

     <tr>
      <td><code class="literal">jpeg</code></td>
      <td>
       To enable support for jpeg add
       <strong class="option configure">--with-jpeg-dir=DIR</strong>. Jpeg 6b, 7 or 8
       are supported.
       As of PHP 7.4.0, use <strong class="option configure">--with-jpeg</strong>
       instead.
      </td>
     </tr>

     <tr>
      <td><code class="literal">png</code></td>
      <td>
       To enable support for png add
       <strong class="option configure">--with-png-dir=DIR</strong>. Note, libpng
       requires the <a href="zlib.requirements.php" class="link">zlib library</a>,
       therefore add <strong class="option configure">--with-zlib-dir[=DIR]</strong>
       to your configure line.
       As of PHP 7.4.0, <strong class="option configure">--with-png-dir</strong> and
       <strong class="option configure">--with-zlib-dir</strong> have been removed.
       <span class="productname">libpng</span> and <span class="productname">zlib</span>
       are required.
      </td>
     </tr>

     <tr>
      <td><code class="literal">xpm</code></td>
      <td>
       To enable support for xpm add
       <strong class="option configure">--with-xpm-dir=DIR</strong>. If configure
       is not able to find the required libraries, you may add the path to
       your X11 libraries.
       As of PHP 7.4.0, use <strong class="option configure">--with-xpm</strong>
       instead.
      </td>
     </tr>

     <tr>
      <td><code class="literal">webp</code></td>
      <td>
       To enable support for webp add <strong class="option configure">--with-webp-dir=DIR</strong>.
       As of PHP 7.4.0, use <strong class="option configure">--with-webp</strong>
       instead.
      </td>
     </tr>

    </tbody>
   
  </table>

  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <span class="simpara">
    When compiling PHP with libpng, you must use the same version that was
    linked with the GD library.
   </span>
  </p></blockquote>
 </p>
 <p class="para">
  Enhance the capabilities of GD to deal with different fonts by specifying
  the <code class="literal">--with-XXXX</code> configure switch to your PHP configure
  line.
  <table class="doctable table">
   <caption><strong>Supported font libraries</strong></caption>
   
    <thead>
     <tr>
      <th>Font library</th>
      <th>Configure Switch</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><code class="literal">FreeType 2</code></td>
      <td>
       To enable support for FreeType 2 add
       <strong class="option configure">--with-freetype-dir=DIR</strong>.
       As of PHP 7.4.0 use <strong class="option configure">--with-freetype</strong>
       instead, which relies on <span class="productname">pkg-config</span>.
      </td>
     </tr>

     <tr>
      <td><code class="literal">Native TrueType string function</code></td>
      <td>
       To enable support for native TrueType string function add
       <strong class="option configure">--enable-gd-native-ttf</strong>.
       (This option has no effect and has been removed as of PHP 7.2.0.)
      </td>
     </tr>

    </tbody>
   
  </table>

 </p>
</div><?php manual_footer($setup); ?>