Support for adding jpeg files to the GD library of liunxphp

Source: Internet
Author: User

Support for adding jpeg files to the GD library of liunxphp

General source code installation and addition of the GD library does not support jpeg images, only supports the following formats

 

GD Support Enabled
GD Version Bundled (2.0.34 compatible)
GIF Read Support Enabled
GIF Create Support Enabled
PNG Support Enabled
LibPNG Version 1.2.49
WBMP Support Enabled
XBM Support Enabled
Next we will add support for jpeg files.

Wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz

Tar-zxvf restart src.v8b.tar.gz
Cd jpeg-8b

./Configure -- prefix =/usr/local/jpeg -- enable-shared -- enable-static
Make & make install

Go to the gd directory under ext under the php source code directory.

Go to the gd directory and run the following command:/usr/local/php/is the php installation path on your server. This is my path.

/Usr/local/php/bin/phpize

./Configure -- with-php-config =/usr/local/php/bin/php-config -- with-jpeg-dir =/usr/local/jpeg/

Make & make install

After these systems are executed, you will be prompted to generate the directory gd. so.

Add gd. so under php. ini, restart php, restart the application server, and then OK.

Some machines may not work yet.

Yum install libjpeg-devel freetype-devel libpng-devel
Make clean and try again./configure
Make & make install

Check phpinfo. OK.

GD Support enabledGD Version 2.0GIF Read Support enabledGIF Create Support enabledJPEG Support enabledlibJPEG Version unknownPNG Support enabledlibPNG Version 1.2.10WBMP Support enabled

 

GD Support Enabled
GD Version Bundled (2.0.34 compatible)
GIF Read Support Enabled
GIF Create Support Enabled
JPEG Support Enabled
LibJPEG Version 8
PNG Support Enabled
LibPNG Version 1.2.49
WBMP Support Enabled
XBM Support Enabled

Directive Local Value Master Value
Gd.jpeg _ ignore_warning 0 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.