zoukankan      html  css  js  c++  java
  • 升级GD 安装freetype

    从php5后GD已经加入到扩展库中,除非系需要更高级的版本,如果没有特殊需要,可以直接使用gd,编译时加上以下的选项



    '--with-gd'
    '--enable-exif'
    '--enable-gd-native-ttf'
    '--with-zlib'
    '--with-png-dir'
    '--with-jpeg-dir'
    '--with-freetype-dir'
    '--with-ttf'
    '--with-gettext=/usr/lib'
    '--enable-gd-jis-conv'



    具体的安装apache php mysql gd的方法可以在gg上搜索。

    由于我已经这安装了好了php跟GD,但是当时是没有支持freetype不能在图片上写文字。
    因为现在需要在图片上写文字。重新编译php,但很多人像我这样的已经安装了GD但原来未有支持freetype,或者其它的某些功能,但加上以下的选项重新编译后,还不能使用新功能,就需要在源代码的目录中运行make clean,然后再运行编译程序
    进入到原来安装php的源码目录下


    vi ./config.nice


    将会看到
    类形似这样的编译条件,这是上一次的成功编译的条件


    #! /bin/sh
    #
    # Created by configure

    './configure'
    '--with-mysql=/usr/local/mysql'
    '--with-apxs2=/usr/local/apache/bin/apxs'
    '--with-gd'
    '--enable-exif'
    '--enable-gd-native-ttf'
    '--enable-inline-optimization'
    '--with-zlib'
    '--with-png-dir'
    '--with-jpeg-dir'
    '--enable-mbstring'
    '--with-gettext=/usr/lib'
    '--enable-gd-jis-conv'
    "$@"


    我顺便升级了一下jpeg6,png,zlib,以下是最后的编译代码


    #! /bin/sh
    #
    # Created by configure

    './configure'
    '--with-mysql=/usr/local/mysql'
    '--with-apxs2=/usr/local/apache/bin/apxs'
    '--with-gd'
    '--enable-exif'
    '--enable-gd-native-ttf'
    '--enable-inline-optimization'
    '--with-zlib=/usr/local/zlib'
    '--with-png-dir=/usr/local/libpng'
    '--with-jpeg-dir=/usr/local/jpeg6'
    '--with-freetype-dir=/usr/local/freetype'
    '--with-ttf'
    '--enable-mbstring'
    '--with-gettext=/usr/lib'
    '--enable-gd-jis-conv'
    "$@"
  • 相关阅读:
    MFC 解析xml文件
    数字图像处理-----主成成分分析PCA
    C++设计模式——建造者模式
    总结的文章--未读
    八大排序算法
    C++读取、旋转和保存bmp图像文件编程实现
    数字图像处理-----直方图均衡化
    数字图像处理------中值滤波
    matlab图像基础知识
    MFC最大化显示任务栏
  • 原文地址:https://www.cnblogs.com/mazefeng/p/3357607.html
Copyright © 2011-2022 走看看