Method Image.AVIF.encode()
- Method
encode
string(8bit)encode(Image.Imageimage,mapping(string:int|Image.Image)|voidoptions)- Description
Encode an image as AVIF.
- Parameter
options "quality":intQuality 0 (worst) to 100 (lossless). Defaults to 60.
"quality_alpha":intAlpha quality 0 (worst) to 100 (lossless). Defaults to 100.
"lossless":boolEnable lossless encoding. Forces quality 100, YUV444, and identity matrix coefficients.
"speed":intEncoder effort, 0 (slowest/best) to 10 (fastest/worst). Defaults to SPEED_DEFAULT.
"depth":intBit depth per channel, 8 or 10. Defaults to 8.
"alpha":Image.ImageAlpha channel image. The red component is used as alpha. Must be the same dimensions as
image.- Returns
The encoded AVIF data as a string.