導航:首頁 > 編程語言 > 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畫圖工具相關的資料

熱點內容
java有哪些數組 瀏覽:984
程序員戴手錶影響工作嗎 瀏覽:235
游戲皇後解壓視頻 瀏覽:367
c語言怎麼打開文件編譯 瀏覽:436
手機上什麼app可以設計logo 瀏覽:800
pid演算法單片機 瀏覽:375
python數據精度 瀏覽:632
管什麼小女孩App 瀏覽:192
phppdf轉換成圖片 瀏覽:468
十八講pdf 瀏覽:619
mysql導入壓縮文件 瀏覽:21
usb控制單片機 瀏覽:906
你為什麼喜歡安卓手機 瀏覽:863
阿里雲伺服器購買和使用 瀏覽:389
單片機sp1 瀏覽:282
大學生玩貓咪解壓 瀏覽:794
php附近的演算法 瀏覽:346
黑馬程序員培訓機構怎麼樣 瀏覽:36
怎麼查找伺服器ip地址 瀏覽:371
華為手機為什麼開不了定位伺服器地址 瀏覽:970