导航:首页 > 编程语言 > 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画图工具相关的资料

热点内容
幼儿编程教育培训多少钱 浏览:401
经常生气有什么东西能解压 浏览:900
代理服务器地址和端口可以怎么填 浏览:62
unity5手游编译模型 浏览:265
安卓无人机app源码 浏览:808
pl1编程语言 浏览:801
台达plc编程换算指令大全 浏览:174
手机上的编程游戏 浏览:108
服务器密码机有什么用 浏览:477
dos磁盘命令 浏览:955
单片机cpu52的功能 浏览:691
opc服务器怎么开发 浏览:373
觅喜是个什么app 浏览:402
加密cd机 浏览:946
社保用什么app缴纳 浏览:313
nodevlinux 浏览:582
腾讯tt服务器怎么登录密码 浏览:898
windows命令提示符 浏览:352
win7管理员权限命令 浏览:729
地图app哪个适合老年人用 浏览:74