mirror of
https://github.com/php/doc-ja.git
synced 2026-04-25 00:48:05 +02:00
159 lines
6.0 KiB
XML
159 lines
6.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 9ba738103b63ee4f129dadf3f8585568609e63b7 Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka,mumumu -->
|
|
<section xml:id="image.installation" xmlns="http://docbook.org/ns/docbook">
|
|
&reftitle.install;
|
|
<para>
|
|
PHPでGDサポートを有効にするには、configure に<option
|
|
role="configure">--with-gd[=DIR]</option>を指定します。ただし、DIRは
|
|
GDのベースインストールディレクトリです。
|
|
PHPにバンドルされている推奨のGDライブラリを使用するには
|
|
<option role="configure">--with-gd</option>を指定します。
|
|
GD ライブラリをコンパイルするには、<productname>libpng</productname> と
|
|
<productname>libjpeg</productname> が必要です。
|
|
PHP 7.4.0 以降では、<option role="configure">--with-gd</option> は
|
|
<option role="configure">--enable-gd</option>
|
|
(gd 拡張モジュールを有効にするかどうかを指定する) と
|
|
<option role="configure">--with-external-gd</option>
|
|
(バンドル版の libgd ではなく、外部の <productname>libgd</productname>
|
|
を使うように指定する) に変わりました。
|
|
</para>
|
|
<para>
|
|
Windows の場合、GD DLL <filename>php_gd.dll</filename> を &php.ini; に
|
|
拡張モジュールとして指定してください。
|
|
PHP 8.0.0 より前のバージョンでは、DLL の名前は
|
|
<filename>php_gd2.dll</filename> でした。
|
|
</para>
|
|
<para>
|
|
より多くの画像フォーマットを扱えるようにGDの能力を高めるには、
|
|
<literal>--with-XXXX</literal>のような形のオプションを指定します。
|
|
<table>
|
|
<title>サポートされる画像フォーマット</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>画像フォーマット</entry>
|
|
<entry>configure オプション</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><literal>avif</literal></entry>
|
|
<entry>
|
|
avif をサポートするには
|
|
<option role="configure">--with-avif</option>
|
|
を指定します。PHP 8.1.0 以降で利用可能です。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>jpeg</literal></entry>
|
|
<entry>
|
|
jpeg をサポートするには
|
|
<option role="configure">--with-jpeg-dir=DIR</option>
|
|
を指定します。Jpeg 6b、7、そして 8 に対応しています。
|
|
PHP 7.4.0 以降では、
|
|
<option role="configure">--with-jpeg</option> を代わりに使って下さい。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>png</literal></entry>
|
|
<entry>
|
|
PNGをサポートするには<option role="configure">--with-png-dir=DIR</option>
|
|
を指定します。ただし、libpngは<link linkend="zlib.requirements">zlibライブラリ</link>を
|
|
必要とするため、<option role="configure">--with-zlib-dir[=DIR]</option>
|
|
もconfigureオプションに追加する必要があります。
|
|
PHP 7.4.0 以降、
|
|
<option role="configure">--with-png-dir</option> と
|
|
<option role="configure">--with-zlib-dir</option> は削除されました。
|
|
<productname>libpng</productname> と <productname>zlib</productname> は必須になっています。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>xpm</literal></entry>
|
|
<entry>
|
|
XPMをサポートするには<option role="configure">--with-xpm-dir=DIR</option>
|
|
を指定します。必要なライブラリをconfigureが見つけられなかった場合は
|
|
X11ライブラリのパスを追加してください。
|
|
PHP 7.4.0 以降では、
|
|
<option role="configure">--with-xpm</option> を代わりに使って下さい。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>webp</literal></entry>
|
|
<entry>
|
|
webp をサポートするには
|
|
<option role="configure">--with-webp-dir=DIR</option>
|
|
を追加してください。
|
|
PHP 7.4.0 以降では、
|
|
<option role="configure">--with-webp</option> を代わりに使って下さい。
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<note>
|
|
<simpara>
|
|
libpng と共に PHP をコンパイルする際、GD
|
|
ライブラリとリンクされる同じバージョンを使用する必要があります。
|
|
</simpara>
|
|
</note>
|
|
</para>
|
|
<para>
|
|
GDがより多くのフォントを扱えるようにするには
|
|
<literal>--with-XXXX</literal>のような形のオプションを指定します。
|
|
<table>
|
|
<title>サポートされるフォントライブラリ</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>フォントライブラリ</entry>
|
|
<entry>configure オプション</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><literal>FreeType 2</literal></entry>
|
|
<entry>
|
|
FreeType 2 をサポートするには
|
|
<option role="configure">--with-freetype-dir=DIR</option>を指定します。
|
|
PHP 7.4.0 以降では、<productname>pkg-config</productname>
|
|
に依存しているので、 <option role="configure">--with-freetype</option> を代わりに使ってください。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>ネイティブ TrueType 文字列関数</literal></entry>
|
|
<entry>
|
|
ネイティブな TrueType 文字列関数 をサポートするには
|
|
<option role="configure">--enable-gd-native-ttf</option>を指定します
|
|
(これは 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
|
|
-->
|