EncodingFormat.webp constructor
WebP format.
The WebP format supports both lossy and lossless compression; however, the
Image.toByteData method always uses lossy compression when webp is
specified. The quality
metric is a value in the range 0 to 100 that
controls the compression ratio; higher values result in better quality but
larger file sizes, and vice versa. WebP images are limited to 16,383
pixels in each direction (width and height).
WebP images normally use the .webp
file extension and the image/webp
MIME type.
See also:
- en.wikipedia.org/wiki/WebP, the Wikipedia page on WebP.
Implementation
const EncodingFormat.webp({int quality = 80})
: _format = _webpFormat,
_quality = quality;