EncodingFormat.jpeg constructor
JPEG format.
This format, strictly speaking called JFIF, is a lossy compression
graphics format that can handle images up to 65,535 pixels in either
dimension. The quality
metric is a value in the range 0 to 100 that
controls the compression ratio. Values in the range of about 50 to 90 are
somewhat reasonable; values above 95 increase the file size with little
noticeable improvement to the quality, values below 50 drop the quality
substantially.
This format is well suited for photographs. It is very poorly suited for images with hard edges or text. It does not support transparency.
JPEG images normally use the .jpeg
file extension and the image/jpeg
MIME type.
See also:
- en.wikipedia.org/wiki/JPEG, the Wikipedia page on JPEG.
Implementation
const EncodingFormat.jpeg({int quality = 80})
: _format = _jpegFormat,
_quality = quality;