国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

PHP 圖像處理

2021-11-19 18:02 更新

PHP 提供了豐富的圖像處理函數(shù),主要包括:

函數(shù) 描述
gd_info() 取得當(dāng)前安裝的 GD 庫(kù)的信息
getimagesize() 獲取圖像信息
imagesx() 、imagesy() 獲取圖像寬度與高度
getimagesizefromstring() 獲取圖像信息
image_type_to_extension() 獲取圖片后綴
image2wbmp() 輸出WBMP圖片
imageaffinematrixconcat() 連接兩個(gè)矩陣
imageaffinematrixget() 獲取矩陣
image_type_to_mime_type() 返回圖像的 MIME 類型
imageaffine() 返回經(jīng)過(guò)仿射變換后的圖像
imagealphablending() 設(shè)定圖像的混色模式
imagecolorallocate() 為一幅圖像分配顏色
imagecolorallocatealpha() 為一幅圖像分配顏色和透明度
imagecolorat() 取得某像素的顏色索引值
imagecolorclosest() 取得與指定的顏色最接近的顏色的索引值
imagecolorclosestalpha() 取得與指定的顏色加透明度最接近的顏色的索引
imagecolorclosesthwb() 取得與指定的顏色最接近的色度的黑白色的索引
imageantialias() 是否使用抗鋸齒(antialias)功能
imagearc() 畫橢圓弧
imagechar() 寫出橫向字符
imagecharup() 垂直地畫一個(gè)字符

GD 庫(kù)

使用 PHP 圖像處理函數(shù),需要加載 GD 支持庫(kù)。請(qǐng)確定 php.ini 加載了 GD 庫(kù):

Window 服務(wù)器上:

extension = php_gd2.dll

Linux 和 Mac 系統(tǒng)上:

extension = php_gd2.so

使用 gd_info() 函數(shù)可以查看當(dāng)前安裝的 GD 庫(kù)的信息:

<?php var_dump(gd_info()); ?>

輸出大致如下:

array(12) {
  ["GD Version"]=>
  string(26) "bundled (2.1.0 compatible)"
  ["FreeType Support"]=>
  bool(true)
  ["FreeType Linkage"]=>
  string(13) "with freetype"
  ["T1Lib Support"]=>
  bool(false)
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPEG Support"]=>
  bool(true)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(true)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)