博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
图像处理库 gd_使用PHP和GD库进行图像处理
阅读量:2520 次
发布时间:2019-05-11

本文共 1895 字,大约阅读时间需要 6 分钟。

图像处理库 gd

David Walsh Sepia

Yeah, I'm a Photoshop wizard. I rock the selection tool. I crop like a farmer. I dominate the bucket tool. Hell, I even went as far as wielding the wizard wand selection tool once.

是的,我是Photoshop向导。 我摇摆选择工具。 我像农夫一样种庄稼。 我主导了存储桶工具。 地狱,我什至甚至挥舞过一次魔杖选择工具。

...OK I'm rubbish when it comes to Photoshop. I avoid opening the memory pig whenever possible. Many times I even need to automate image manipulation on customer websites. Luckily for a nerd like me, PHP's GD library allows me to systematically execute basic image manipulations without the need for Photoshop, GIMP, or other desktop tools.

...好,关于Photoshop,我很垃圾。 我避免尽可能打开内存管。 很多时候,我什至需要在客户网站上自动化图像处理。 幸运的是,对于像我这样的书呆子,PHP的GD库使我可以系统地执行基本的图像操作,而无需使用Photoshop,GIMP或其他桌面工具。

PHP-颜色从灰度 (The PHP -- Color to Greyscale)

//to black and whiteif(!file_exists('dw-bw.png')) {	$img = imagecreatefrompng('dw-manipulate-me.png');	imagefilter($img,IMG_FILTER_GRAYSCALE);	imagepng($img,'db-bw.png');	imagedestroy($img);}

PHP-颜色变为负数 (The PHP -- Color to Negative)

//to negativeif(!file_exists('dw-negative.png')) {	$img = imagecreatefrompng('dw-manipulate-me.png');	imagefilter($img,IMG_FILTER_NEGATE);	imagepng($img,'db-negative.png');	imagedestroy($img);}

PHP-棕褐色的颜色 (The PHP -- Color to Sepia)

//to black and white, then sepiaif(!file_exists('dw-sepia.png')) {	$img = imagecreatefrompng('dw-manipulate-me.png');	imagefilter($img,IMG_FILTER_GRAYSCALE);	imagefilter($img,IMG_FILTER_COLORIZE,100,50,0);	imagepng($img,'db-sepia.png');	imagedestroy($img);}

As you can see, PHP's GD library is a very competent, useful library. Though image libraries like ImageMagick get more credit than GD, GD is more than enough for the majority of designers and developers. Be sure to check out -- you can emboss images, fade images, and much more!

如您所见,PHP的GD库是一个非常有用的有用的库。 尽管像ImageMagick这样的图像库比GD获得更多的信誉,但是GD对于大多数设计人员和开发人员来说绰绰有余。 一定要检查 -您可以压印图像,淡化图像等等!

翻译自:

图像处理库 gd

转载地址:http://wjpwd.baihongyu.com/

你可能感兴趣的文章
windows 10 & Office 2016 安装
查看>>
最短路径(SP)问题相关算法与模板
查看>>
js算法之最常用的排序
查看>>
Python——交互式图形编程
查看>>
经典排序——希尔排序
查看>>
团队编程项目作业2-团队编程项目代码设计规范
查看>>
英特尔公司将停止910GL、915GL和915PL芯片组的生产
查看>>
团队编程项目作业2-团队编程项目开发环境搭建过程
查看>>
Stax解析XML示例代码
查看>>
cookie
查看>>
二级图片导航菜单
查看>>
<Using parquet with impala>
查看>>
07-Java 中的IO操作
查看>>
uclibc,eglibc,glibc之间的区别和联系【转】
查看>>
Java魔法堂:找外援的利器——Runtime.exec详解
查看>>
mysql数据库存放路径
查看>>
TestNG(五)常用元素的操作
查看>>
解决 Visual Studio 点击添加引用无反应的问题
查看>>
通过镜像下载Android系统源码
查看>>
python字符串格式化 %操作符 {}操作符---总结
查看>>