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

热点内容
魔鬼训练程序员 浏览:686
php上传大文件失败 浏览:602
sw服务器指定端口怎么填 浏览:189
java有哪些数组 浏览:984
程序员戴手表影响工作吗 浏览:235
游戏皇后解压视频 浏览:367
c语言怎么打开文件编译 浏览:436
手机上什么app可以设计logo 浏览:800
pid算法单片机 浏览:375
python数据精度 浏览:632
管什么小女孩App 浏览:192
phppdf转换成图片 浏览:468
十八讲pdf 浏览:619
mysql导入压缩文件 浏览:22
usb控制单片机 浏览:906
你为什么喜欢安卓手机 浏览:863
阿里云服务器购买和使用 浏览:389
单片机sp1 浏览:282
大学生玩猫咪解压 浏览:794
php附近的算法 浏览:346