导航:首页 > 编程语言 > php画图工具

php画图工具

发布时间:2024-02-23 07:11:15

php怎么输出背景透明的图片

php可以使用GD库或者ImageMagick工具生成png或者gif的背景透明图片.推荐使用ImageMagick.
这里有范例 http://php.net/manual/en/imagick.examples-1.php
准备一张png图片,放到php文件的目录,运行看看效果.
<?php
/* Read the image */
$im = new Imagick("test.png");
/* Thumbnail the image */
$im->thumbnailImage(200, null);

/* Create a border for the image */
$im->borderImage(new ImagickPixel("white"), 5, 5);

/* Clone the image and flip it */
$reflection = $im->clone();
$reflection->flipImage();

/* Create gradient. It will be overlayed on the reflection */
$gradient = new Imagick();

/* Gradient needs to be large enough for the image and the borders */
$gradient->newPseudoImage($reflection->getImageWidth() + 10, $reflection->getImageHeight() + 10, "gradient:transparent-black");

/* Composite the gradient on the reflection */
$reflection->compositeImage($gradient, imagick::COMPOSITE_OVER, 0, 0);

/* Add some opacity. Requires ImageMagick 6.2.9 or later */
$reflection->setImageOpacity( 0.3 );

/* Create an empty canvas */
$canvas = new Imagick();

/* Canvas needs to be large enough to hold the both images */
$width = $im->getImageWidth() + 40;
$height = ($im->getImageHeight() * 2) + 30;
$canvas->newImage($width, $height, new ImagickPixel("black"));
$canvas->setImageFormat("png");

/* Composite the original image and the reflection on the canvas */
$canvas->compositeImage($im, imagick::COMPOSITE_OVER, 20, 10);
$canvas->compositeImage($reflection, imagick::COMPOSITE_OVER, 20, $im->getImageHeight() + 10);

/* Output the image*/
header("Content-Type: image/png");
echo $canvas;
?>

❷ 绘图软件有哪些

常用的制图软件有很多,主要有:
1、Photoshop。最强大的图像处理软件,以处理像素所构成的数字图像为主。该软件拥有众多的编修与绘图工具,使用方便,功能强大,可以高效地进行图片处理工作。
2、Coreldraw。Coreldraw是一款以处理矢量文件为主的绘图与排版软件,主要用于商标设计、标志制作、模型绘制、插图描画、排版及分色输出等诸多领域。在美术设计和商业设计领域十分受欢迎。
3、Adobe Illustrator。Adobe Illustrator与Coreldraw类似,也是一款用于处理矢量插画的软件。但不同的是,Adobe Illustrator广泛应用于印刷出版、海报书籍排版等,主要是为线稿提供较高的精度和控制,适合各种出版物插图的处理。
4、AutoCAD。AutoCAD是一款计算机辅助设计软件,可以用于绘制二维制图和基本三维设计。
5、ArcGIS。ArcGIS是一款地理信息系统软件,可用于地理数据的存储、显示、制图、分析等。

阅读全文

与php画图工具相关的资料

热点内容
python读取在线表格 浏览:999
喝什么茶能缓解压抑 浏览:865
u命令无法打开 浏览:960
vue编译后的js能爬吗 浏览:453
解压骰子推荐3代 浏览:749
安卓手机划线密码忘了怎么解锁 浏览:309
精美角度主图指标源码 浏览:278
程序员编程函数需要特别好吗 浏览:181
fue加密毛发怎么样 浏览:929
网上考学历app如何屏蔽 浏览:352
python矩阵库 浏览:160
服务器如何ping服务器 浏览:281
云服务器双机热备怎么做 浏览:100
安卓果盘高清帐号是什么帐号 浏览:548
苹果解激活锁什么叫服务器解锁 浏览:596
用海绵宝宝做解压的东西 浏览:192
大pdf文件免费转word 浏览:792
如何侵入ftp服务器 浏览:192
智行app如何查询学生票使用次数 浏览:736
程序员几年后开始有前途 浏览:126