Files
archived-doc-pt-br/reference/image/configure.xml
2024-10-10 16:26:14 -03:00

158 lines
5.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: 9ba738103b63ee4f129dadf3f8585568609e63b7 Maintainer: felipe Status: ready --><!-- CREDITS: fernandoc,felipe,cviniciussdias,leonardolara -->
<section xml:id="image.installation" xmlns="http://docbook.org/ns/docbook">
&reftitle.install;
<para>
Para ativar suporte ao GD, configure o PHP com
<option role="configure">--with-gd[=DIR]</option>, aonde DIR é o
diretório de instalação. Para usar a versão recomendada da biblioteca GD que acompanha o PHP,
use a opção de configuração
<option role="configure">--with-gd</option>.
Biblioteca GD requer <productname>libpng</productname> e
<productname>libjpeg</productname> para compilar.
Desde o PHP 7.4.0, <option role="configure">--with-gd</option> se torna
<option role="configure">--enable-gd</option> (para simplesmente
abilitar a extensão) e <option role="configure">--with-external-gd</option>
(para selecionar uma instalação <productname>libgd</productname> externa,
diferente da que acompanha o PHP).
</para>
<para>
No Windows, você irá incluir a DLL do GD <filename>php_gd.dll</filename> como
uma extensão no &php.ini;.
Antes do PHP 8.0.0 a DLL se chamava <filename>php_gd2.dll</filename>.
</para>
<para>
Melhore as capacidades do GD para manipular mais formatos de imagens especificando
a opção <literal>--with-XXXX</literal> na sua
linha de configuração do PHP.
<table>
<title>Formatos de imagens suportados</title>
<tgroup cols="2">
<thead>
<row>
<entry>Formato de Imagem</entry>
<entry>Opção de Configuração</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>avif</literal></entry>
<entry>
Para habilitar suporte a avif aicione
<option role="configure">--with-avif</option>.
Disponível a partir do PHP 8.1.0.
</entry>
</row>
<row>
<entry><literal>jpeg</literal></entry>
<entry>
Para ativar suporte a jpeg adicione
<option role="configure">--with-jpeg-dir=DIR</option>. Jpeg 6b, 7 ou 8
são suportados.
A partir do PHP 7.4.0, use a opção
<option role="configure">--with-jpeg</option>.
</entry>
</row>
<row>
<entry><literal>png</literal></entry>
<entry>
Para ativar suporte para png adicione
<option role="configure">--with-png-dir=DIR</option>. Note que, libpng
precisa de <link linkend="zlib.requirements">zlib library</link>,
portanto adicione a opção <option role="configure">--with-zlib-dir[=DIR]</option>
na sua linha de configuração.
A partir do PHP 7.4.0, <option role="configure">--with-png-dir</option> e
<option role="configure">--with-zlib-dir</option> foram removidas.
<productname>libpng</productname> e <productname>zlib</productname>
são necessárias.
</entry>
</row>
<row>
<entry><literal>xpm</literal></entry>
<entry>
Para ativar suporte a xpm adicione
<option role="configure">--with-xpm-dir=DIR</option>. Se o configure
não for capaz de encontrar as bibliotecas necessárias, você deverá adicionar
o caminho até as suas bibliotecas X11.
A partir do PHP 7.4.0, use a opção
<option role="configure">--with-xpm</option>.
</entry>
</row>
<row>
<entry><literal>webp</literal></entry>
<entry>
Para habilitar suporte a webp, adicione <option role="configure">--with-webp-dir=DIR</option>.
A partir do PHP 7.4.0, use a opção
<option role="configure">--with-webp</option>.
</entry>
</row>
</tbody>
</tgroup>
</table>
<note>
<simpara>
Ao compilar o PHP com a libpng, você deve usar a mesma versão que foi
ligada com a biblioteca GD.
</simpara>
</note>
</para>
<para>
Melhore as capacidades do GD para lidar com fontes diferentes especificando
a opção de configuração <literal>--with-XXXX</literal> na linha de
configuração do PHP.
<table>
<title>Bibliotecas de Fontes Suportadas</title>
<tgroup cols="2">
<thead>
<row>
<entry>Biblioteca de Fonte</entry>
<entry>Opção de Configuração</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>FreeType 2</literal></entry>
<entry>
Para ativar suporte a FreeType 2 adicione
<option role="configure">--with-freetype-dir=DIR</option>.
A partir do PHP 7.4.0, use <option role="configure">--with-freetype</option>,
que usa <productname>pkg-config</productname>.
</entry>
</row>
<row>
<entry><literal>Native TrueType string function</literal></entry>
<entry>
Para ativar suporte a native TrueType string function adicione
<option role="configure">--enable-gd-native-ttf</option>.
(Essa opção não tem efeito e foi removida no PHP 7.2.0).
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</section>
<!-- 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
-->