Download address (GITHUB.COM/MASTEREXPLODER/PHPTHUMB).
Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents.
In the site construction process, the need to deal with the picture of the place many, with the PHP picture function processing pictures, very cumbersome.
And very difficult for beginners to master. Now we can use the Phpthumb class library to deal with the picture, including, image resizing, image interception, image plus watermark, image rotation and so on.
Example:
< span>' Path/to/thumblib.inc.php '< span>= Phpthumbfactory::create (' http://www.jbxue.com/'< span>->resize (100 < Span $thumb span>->resizepercent (50 ->adaptiveresize (175, 175 ->cropfromcenter (100 ->crop (180, 200 ->rotateimagendegrees (180 < Span $thumb span>->save (' newpath/of/image.jpg ');
< span="">
Another powerful PHP image thumbnail class: Phpthumb
In addition to scaling the picture, the class can also convert the picture to different format output (such as the GIF format of the image output to PNG format), its features include color, effects, etc.
Official website: http://phpthumb.sourceforge.net/
Generally, only the following files are required:
<< span>< span="">< span="">< span="">< span="">< span="">< span="">< span="">< span="">< span="">< span="">< span=""> < < span=""> /c26>< span=""> < span=""> < span=""> < span=""> < span="">< span=""> < span="">< span=""> < c48> < span=""> < span="">
< span="">
SRC: Address of the target image
W: the width of the output picture
H: The height of the output image (if not specified he will be scaled by the W parameter, etc.)
Q: If the output is in JPG format, you can specify its output quality
BG: Background When output (if required)
SW, SH, SX, SY: Local output, wide height, starting position
F: Output format, can be JPEG, PNG, GIF, ICO
SFN: Output A frame in an animated GIF
Fltr[]: Filters, can have a lot of effects, including sharpening, Blur, spin flip, watermark, border, matte, color adjustment, etc.
Original address: http://www.jbxue.com/article/php/20250.html
http://www.bkjia.com/PHPjc/764244.html www.bkjia.com true http://www.bkjia.com/PHPjc/764244.html techarticle Download Address (github.com/masterexploder/phpthumb). Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents. In the net ...