phpでGDを使う場合のconfigure
とりあえずメモしておこっと。忘れちゃうからね・・・。
そういえば、「GD」をインストールする前に「Feetype」「png」「jpeg」「zlib」は
先にインストールしないと「GD」をconfigureしても反映されないんだね・・・。
「Freetype」をインストールせずに「GD」をconfigureしたら
# tar zxvf gd-2.0.28.tar.gz
# cd gd-2.0.28
# ./configure --without-libiconv-prefix
** Configuration summary for gd 2.0.28:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: no
Support for Xpm library: yes
Support for pthreads: yes
ってなったから、「Freetype」をインストールしてから
「GD」をインストールしたら
# tar zxvf gd-2.0.28.tar.gz
# cd gd-2.0.28
# ./configure --without-libiconv-prefix
** Configuration summary for gd 2.0.28:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Xpm library: yes
Support for pthreads: yes
ってなったので、
# make
# make install
でインストール。
ちなみに「Freetype」って
TrueTypeフォントをレンダリングするライブラリ
1989年にApple社が開発し、同社のMac OS 7.0(当時はSystem 7.0)から搭載している
フォントシステム。
また、同システムで用いられるフォント形式。
Microsoft社に技術供与され、Windows 95からはシステム標準のフォントシステムとして
広く用いられている。
TrueTypeはOSの機能として実装されたアウトラインフォントシステムであるため、
拡大・縮小してもジャギー(ギザギザ)が生じず、解像度によらない精細な出力を画面と
印刷の両方で同じように得られる。
らしい。
PHPのconfigure
一応「MySQL」と「Postgres」を両方使う場合。
./configure
--with-pgsql=/usr/local/pgsql
--with-mysql=/usr/local/mysql
--enable-track-vars
--with-apxs=/usr/local/apache/bin/apxs
--enable-versioning
--enable-mbstring
--enable-mbregex
--enable-mbstr-enc-trans
--with-gd
--with-freetype-dir=/usr/local/include/freetype2
--with-jpeg-dir=/usr/local/lib
--with-png-dir=/usr/local/lib
--with-zlib-dir=/usr/local/lib
--enable-gd-native-ttf
--enable-gd-jis-conv
--enable-bcmath
※「浮動小数点の計算が何やらおかしくなることがあるから(--enable-bcmath)はあった方がいい。
画像サイズをピクセル単位で計算して変換する時に計算が狂う場合があるので、
PHPのBCMath任意精度数学関数を使うと良い」とNさんから助言されオプションに付けました。
Thanksです。
そして忘れないようにしないとね・・・。
こういうのでハマルからさ。
「GD」使うのに解らない場合、ここ結構良いかも。
「Shinta's website」
http://www.gadgety.net/shin/tips/unix/php-gd.html
- Posted at:
- 2006/12/24 11:34:12
- 0 Comments
- 0 TrackBacks
- Tags:
- PHP
- Trackback:
- http://kishi-r.com/2006/12/24/phpconfigure/trackback/
TrackBacks
まだ登録されていません。


Comments
まだ登録されていません。