2014 10 best PHP Image Operations Library, 2014php_php tutorial

Source: Internet
Author: User
Tags image processing library

2014 10 best PHP Image operations Library, 2014php


Thomas Boutell and numerous developers have created a library of graphics software known for the GD Graphics library for dynamic graphical computing. GD provides support for many programming languages such as C, Perl, Python, PHP, OCaml, and so on. In addition to generating HTML output, you can also use PHP to create and calculate graphics files in a variety of graphic file formats such as PNG, JPEG, GIF, WBMP, and xpm. Also, the use of PHP allows you to output an image stream directly to a browser. To do this, you need to compile PHP with the use of the GD library image feature.

In this article, you'll learn about the 10 best PHP graphing libraries that can help you simplify your work. These graph computing libraries will help you with your graphics-related work. Some of the best PHP graphic computing libraries for developers are described below:

1. Imagine

The image processing library is an object-oriented PHP library built with PHP 5.3. By using this library, you can easily work with images such as cropping, resizing, and placing filters. To produce the specified RGB code value and the percentage of object transparency, the library's color class has two parameters in its constructor.

2. PHP Graphic Works

This library is created to perform image processing on the server side. Using this image library allows you to perform complex image processing in a simple way. Operations that can be performed on an image, including rotation, cropping, zooming, stretching, and flipping. And you just have to do this with a bunch of code.

3. Zebra Image

This lightweight and object-oriented image processing library is built with PHP. The image formats it supports include Jpg,gif and PNG. It has a unique ability to convert a format to another format after each action.

4. PHP5 Image Manipulation

This fully object-oriented image processing library is available for PHP and GD2. It is considered an extended form of the Php-image project. This object-oriented image processing library provides various ICO image file types, such as Png,gif, PSD, JPEG, and ICO. In addition, it can output various image file types supported by GD2.

5. Dynamic Virtual image generation

This is a free PHP script library through which you can generate images of any size and color. In addition, you can enter text above the image.

6. Wideimage

Wide image is also considered an object-oriented library for image processing. Using this library, you can perform general operations such as processing, loading, saving images in an image format, and so on.

7. Image Cache

This lightweight PHP class is used to move, compress, and cache images in the browser. It then returns the new source of the image that is printed in the Images tab. You can use this library by setting various options, such as base URL, directory, and so on.

8. Image Workshop

This is a free-to-use PHP class that is considered a layer-based image editing software. It allows you to overlay multiple layers and have the ability to perform functions such as placing one image on top of another, and resizing, cropping, writing, rotating, stacking, and so on.

9. Asido

This is a PHP library with operation image-rich functionality, suitable for any operating environment, such as Magick Wand, GD2, and image Magick. It supports both PHP4 and PHP5.

Ten. Phpthumb

In addition to supporting a variety of popular image formats, the PHP library accepts all image resource types. Using the Image manipulation library, you can rotate, crop, and watermark pictures. In addition, you can define the pixels of the image.


How to output images in PHP GB Image Library

Invocation Example: Output of "China" two Chinese characters through GD
example.php

Header ("Content-type:image/gif");
$im = Imagecreate (400,300);
$bkg = Imagecolorallocate ($im, 0,0,0);
$CLR = Imagecolorallocate ($im, 255,255,255);
$FNT = "D:/winnt/fonts/simhei.ttf";
Include ("gb2utf8.php");
$str = Gb2utf8 ("China");
Imagettftext ($im, 0, $CLR, $fnt, $STR);
Imagegif ($im);
Imagedestroy ($im);

Insert and display operation code for PHP+MYSQL pictures

If the picture stream, the database will be very large, suggest or save the path, the picture is placed in a unified directory, easy to manage
Save is the Insert field with the Vchar of the relative path to be able to
Reading is checking the database and putting it in the array,
The display is ready.

function Uploadphoto ($file) {

$this->result = false;
$this->error = false;
--Save parameters
$this->_file = $file;
Get path
$this->createuploaddir ();
$this->_destination=systemproperties:: $UPLOAD _root_path[' photo ';
if (!is_null ($allowed)) {$this->_allowed = $allowed;} else {$this->_allowed = array (' jpg ', ' jpeg ', ' gif ', ' PNG '); }

--Check that the FILE array is even set
if (Isset ($file) && Is_array ($file) && $this->upload_error ($file [' Error '])} {

--Cool, now set some variables
$fileID = $this->_idgenerator->getnextid (' IMAGE ');
$FILEEXT = $this->ext ($file [' name ']);
$fileName = $fileID. '. '. $FILEEXT;
$this->createfiledir (' image ', $fileName);
$FILETMP = $file [' Tmp_name '];
$fileSize = $file [' Size '];
$fileType = $file [' type '];
$fileError = $file [' ERROR '];

--Update Name
$this->_name = $this->_destination. $fileName;
--it ' s been uploaded with PHP
if (Is_uploaded_file ($FILETMP)) {
-Where to put the file?
$filePath = $this->_fileutil->getfilepath ($fileName);
$output = $this->_destination. $filePath [' FilePath '];
...... Remaining full text >>

http://www.bkjia.com/PHPjc/903168.html www.bkjia.com true http://www.bkjia.com/PHPjc/903168.html techarticle 2014 The 10 best PHP Image manipulation libraries, 2014php Thomas Boutell and numerous developers created a library of graphics software known for the GD Graphics library for dynamic graphical computing. GD offers ...

  • 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.