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

热点内容
怎么把百度云资源压缩 浏览:456
不会数学英语如何编程 浏览:88
如何能知道网站服务器地址 浏览:648
程序员月薪5万难吗 浏览:138
如何评价程序员 浏览:803
云虚机和服务器的区别 浏览:403
广西柳州压缩机厂 浏览:639
arm开发编译器 浏览:833
51单片机的核心 浏览:746
看电视直播是哪个app 浏览:958
将c源程序编译成目标文件 浏览:787
再要你命3000pdf 浏览:558
ai软件解压软件怎么解压 浏览:520
文件夹怎样设置序列号 浏览:963
javascriptgzip压缩 浏览:248
易语言怎么取出文件夹 浏览:819
苹果xs手机加密app哪里设置 浏览:605
超声雾化器与压缩雾化器 浏览:643
模拟实现进程调度算法 浏览:388
现在的压缩包都是加密 浏览:331