Toggle main menu visibility
新聞
下載
教材
影音
討論
其他選單
好站連結
行事曆
電子相簿
常見問題
萬用表單
即時留言簿
友站消息
社大學員
:::
登入
登入
帳號
密碼
登入
重整畫面
:::
所有書籍
「[982]PHP網站開發 進階應用技巧」目錄
MarkDown
13-1 pdf.php
1. 簡易jquery應用
1-1 index.html
2. jquery六大工具(上)
2-1 tabs範例
2-2 tabs AJAX範例
2-3 垂直選單
2-4 水平選單
3. jquery六大工具(下)
4. 即時新增表單欄位
4-1 telbook.php
4-2 電話簿+垂直捲軸
5. 表單驗證
5-1 mem.php
5-2 mem_chk.php
5-3 jquery.validationEngine-tw.js
6. PHP圖表pChart
6-1 demo1.php
7. 月曆功能
7-1 get_event.php(正確完成版,可抓出該月事件)
8. CSV的匯出與匯入
9. 所見即所得編輯器
10. 多檔上傳
10-1 index.php
11. 縮圖及上傳物件
11-1 index.php
12. 製作PDF檔(上)
12-1 pdf.php
12-2 解決Linux下PDF無法秀出中文
13. 製作PDF檔(下)
13-1 pdf.php
14. 線上影像合成
14-1 index.php
14-2 pic.php
15. 圖形認證與計數器
15-1 index.php
15-2 pic.php
15-3 show.php
15-4 counter.php
16. Google Map初探
16-1 index.html
17. 搜尋存取GMap位置
17-1 index.php
18. 憑空生出Excel檔
18-1 12月份工作表
18-2 excel.php
14-1 index.php
\[982\]PHP網站開發 進階應用技巧 ===================== [](http://120.115.2.76/tad/tad_book3/file/9802/14.zip) ### 一、建立基本GD圖檔
<?php header("Content-type: image/png"); $im = @imagecreatetruecolor(120, 60) or die("無法建立GD圖片"); $text\_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text\_color); imagepng($im); imagedestroy($im); ?>
### 二、常用GD函數 1.resource imagecreate(int $寬 , int $高) //建立畫布 2.resource imagecreatetruecolor(int $寬 , int $高) //建立全彩畫布 3.int imagecolorallocate(resource $im ,int $紅 ,int $綠 ,int $藍)//定義顏色 4.bool imagefill ( resource $image , int $x , int $y , int $color ) 5.bool imagestring(resource $im , int $字型 , int $x , int $y , string $內容 , int $顏色) //欲寫入的字串,字型是1~5,為內建的英文字型 6.bool imagepng(resource $im \[, string $檔名 \[, int $品質 \[, int $濾鏡\]\]\]) 7.bool imagedestroy(resource $im) //釋放記憶體 ### 三、加入中文字型 1.array imagettftext(resource $im , float $大小 , float $角度 , int $x , int $y , int $顏色 , string $字型檔 , string $文字) ### 四、在現有圖檔建立GD圖 1.resource imagecreatefrompng(string $檔名) ### 五、插入圖片 1.bool imagecopy( resource $目的 , resource $來源 , int $目的\_x , int $目的\_y , int $來源\_x , int $來源\_y , int $來源寬 , int $來源高) 2.bool imagecopyresized(resource $目的 , resource $來源 , int $目的\_x , int $目的\_y , int $來源\_x , int $來源\_y , int $目的寬 , int $目的高 , int $來源寬 , int $來源高) 3.bool imagecopyresampled(resource $目的 , resource $來源 , int $目的\_x , int $目的\_y , int $來源\_x , int $來源\_y , int $目的寬 , int $目的高 , int $來源寬 , int $來源高)
<?php header("Content-type: image/png"); $im = imagecreatefrompng("blank\_logo.png") or die("無法建立GD圖片"); $background\_color = imagecolorallocate($im, 255, 100, 255); $text\_color = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); $im2 = imagecreatefrompng("icon/Find.png") or die("無法建立GD圖片"); imagecopyresampled( $im , $im2 , 30 , 0 , 0 , 0 , 32,32 , 256 , 256); imagettftext($im , 9 , 0 , 5 , 48 , $text\_color , "fireflysung.ttf" , "中文字測試"); imagepng($im); imagedestroy($im); ?>
:::
搜尋
search
進階搜尋
QR Code 區塊
快速登入
所有討論區
「PHP全端開發」線上課程討論區
XOOPS使用討論區
一般研習學員
社大學員專用
路過哈啦區
XOOPS佈景設計
XOOPS模組開發
Tad書籍區
即時留言簿
書籍目錄
展開
|
闔起
線上使用者
65
人線上 (
17
人在瀏覽
線上書籍
)
會員: 0
訪客: 65
更多…