imageavif
(PHP 8 >= 8.1.0)
imageavif — 輸出圖像到瀏覽器或檔案。
說明
   imageavif(
GdImage
resource|string|null
int
int
): bool
  
  GdImage
$image,resource|string|null
$file = null,int
$quality = -1,int
$speed = -1): bool
   Outputs or saves a AVIF Raster image from the given image.
  
參數
- 
image
- 
由圖像建立函式(例如imagecreatetruecolor())返回的 GdImage 對象。 
- 
file
- 
      檔案儲存的路徑或者已打開的流資源(此方法返回后自動關閉該流資源),如果未設定或為 null,將會直接輸出原始圖像流。
- 
quality
- 
      qualityis optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If-1is provided, the default value30is used.
- 
speed
- 
      speedis optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If-1is provided, the default value6is used.
返回值
   成功時返回 true, 或者在失敗時返回 false。
  
警告
 如果 libgd 輸出影象失敗,函式會返回 true。
參見
- imagepng() - 以 PNG 格式將影象輸出到瀏覽器或檔案
- imagewbmp() - 以 WBMP 格式將影象輸出到瀏覽器或檔案
- imagejpeg() - 輸出圖像到瀏覽器或檔案。
- imagetypes() - 返回目前 PHP 版本所支援的影象型別