downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/image.requirements.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'image.requirements.php',
   
1 => 'Requirements',
  ),
 
'up' =>
  array (
   
0 => 'image.setup.php',
   
1 => 'Installing/Configuring',
  ),
 
'prev' =>
  array (
   
0 => 'image.setup.php',
   
1 => 'Installing/Configuring',
  ),
 
'next' =>
  array (
   
0 => 'image.installation.php',
   
1 => 'Installation',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="image.requirements" class="section">
  <h2 class="title">Requirements</h2>
  <p class="para">
   If you have the <acronym title="Graphics Draw">GD</acronym> library (available at <a href="http://www.libgd.org/" class="link external">&raquo; http://www.libgd.org/</a>) you will also be able to create
   and manipulate images.
  </p>
  <p class="para">
   The format of images you are able to manipulate depend on the
   version of <acronym title="Graphics Draw">GD</acronym> you install, and any other libraries
   <acronym title="Graphics Draw">GD</acronym> might need to access those image formats.
   Versions of <acronym title="Graphics Draw">GD</acronym> older than gd-1.6
   support <acronym title="Graphic Interchange Format">GIF</acronym> format images, and do not support
   <acronym title="Portable Network Graphics">PNG</acronym>, where versions greater than gd-1.6 and less than
   gd-2.0.28 support PNG, not GIF. <acronym title="Graphic Interchange Format">GIF</acronym>
   support was re-enabled in gd-2.0.28.
   </p><blockquote><p><b class="note">Note</b>:
    <span class="simpara">
     Since PHP 4.3 there is a bundled version of the <acronym title="Graphics Draw">GD</acronym>
     lib. This bundled version has some additional features like alpha
     blending, and should be used in preference to the external library
     since its codebase is better maintained and more stable.
    </span>
   </p></blockquote><p>
  </p>
  <blockquote><p><b class="note">Note</b>:
  
    Support for GD 1.x has been removed as of PHP 6.0.0, which requires GD
    2.0.33 or later.
   <br />
  </p></blockquote>
  <p class="para">
   You may wish to enhance <acronym title="Graphics Draw">GD</acronym> to handle more image formats.
   </p><table class="doctable table">
   <caption><b>Supported image formats</b></caption>
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Image format</th>
       <th>Library to download</th>
       <th>Notes</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left"><i>gif</i></td>
       <td class="empty">&nbsp;</td>
       <td align="left">
        Only supported in <acronym title="Graphics Draw">GD</acronym> versions older than gd-1.6 and newer than
        gd-2.0.28. <em class="emphasis">Read-only
        </em> <acronym title="Graphic Interchange Format">GIF</acronym> support is available with PHP 4.3.0 and the bundled
        GD-library. <em class="emphasis">Write</em> support is available since
        PHP 4.3.9 and PHP 5.0.1.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>jpeg-6b</i></td>
       <td align="left"><a href="ftp://ftp.uu.net/graphics/jpeg/" class="link external">&raquo; ftp://ftp.uu.net/graphics/jpeg/</a></td>
       <td align="left">
        When building the jpeg-v6b library (prior to building PHP) you
        must use the <span class="option">--enable-shared</span>
        option in the configure step.  If you do not, you will receive
        an error saying <i>libjpeg.(a|so) not found</i>
        when you get to the configure step of building PHP.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>png</i></td>
       <td align="left"><a href="http://www.libpng.org/pub/png/libpng.html" class="link external">&raquo; http://www.libpng.org/pub/png/libpng.html</a></td>
       <td align="left">
        Only supported in <acronym title="Graphics Draw">GD</acronym> versions greater than gd-1.6.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>xpm</i></td>
       <td align="left"><a href="ftp://metalab.unc.edu/pub/Linux/libs/X/!INDEX.html" class="link external">&raquo; ftp://metalab.unc.edu/pub/Linux/libs/X/!INDEX.html</a></td>
       <td align="left">
        It&#039;s likely you have this library already available, if your system
        has an installed X-Environment.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>

  <p class="para">
   You may wish to enhance <acronym title="Graphics Draw">GD</acronym> to deal with different fonts. The following
   font libraries are supported:
   </p><table class="doctable table">
   <caption><b>Supported font libraries</b></caption>
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Font library</th>
       <th>Download</th>
       <th>Notes</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left"><i>FreeType 1.x</i></td>
       <td align="left"><a href="http://www.freetype.org/" class="link external">&raquo; http://www.freetype.org/</a></td>
       <td align="left">Support removed as of PHP 6.0.0</td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>FreeType 2</i></td>
       <td align="left"><a href="http://www.freetype.org/" class="link external">&raquo; http://www.freetype.org/</a></td>
       <td class="empty">&nbsp;</td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>T1lib</i></td>
       <td align="left"><a href="ftp://sunsite.unc.edu/pub/Linux/libs/graphics/" class="link external">&raquo; ftp://sunsite.unc.edu/pub/Linux/libs/graphics/</a>)</td>
       <td align="left">
        Support for Postscript Type 1 fonts.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites