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

熱點內容
反編譯怎麼解決字串長度 瀏覽:279
農行app怎麼凍結賬號 瀏覽:759
mt反編譯的軟體打不開 瀏覽:518
安卓日上免稅APP如何安裝 瀏覽:583
怎麼買星空加密狗 瀏覽:19
北京程序員薪酬 瀏覽:133
華為榮耀暢玩8c升級方舟編譯器 瀏覽:412
手機怎麼把照片填入文件夾 瀏覽:305
php圖片輪換 瀏覽:929
科二學車app軟體哪個好 瀏覽:645
用aj踩東西的解壓視頻 瀏覽:382
將python編譯成手機app 瀏覽:475
程序員社招國企好進么 瀏覽:696
php路徑寫法 瀏覽:432
為什麼有些網頁安卓打不開 瀏覽:220
如何滲透獲取伺服器資料庫 瀏覽:778
ios是怎麼解析app的 瀏覽:256
按揭車怎麼貸款app 瀏覽:477
linux卸載nodejs 瀏覽:128
find方法php 瀏覽:303