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

热点内容
电视看篮球app哪个好 浏览:47
高中毕业当程序员 浏览:245
php标签属性大全 浏览:897
远程访问服务器ip地址 浏览:312
程序员吃鸡蛋炒菜 浏览:173
在哪里看俄罗斯电视剧app 浏览:308
怎么找数据库服务器地址 浏览:487
服务器调试怎么翻译 浏览:921
php如何处理ajax请求 浏览:211
php数组下标存在 浏览:707
php获取ip归属地 浏览:175
撩女程序员怎么办 浏览:508
百度服务器做什么 浏览:193
打开软件加速服务器有什么危害 浏览:87
php去除数组下标 浏览:794
ipad的app内容哪里看 浏览:284
遇见空间app在哪里 浏览:547
用命令对一个文件内容进行统计 浏览:317
华为交换机配置命令缩写 浏览:344
链接服务器出现问题怎么处理 浏览:834