init(contentType:encodingQuality:)
Initialize an instance of this type with the given content type and encoding quality.
Declaration
init(contentType: UTType, encodingQuality: Float = 1.0)Parameters
- contentType:
The image format to use when encoding images.
- encodingQuality:
The encoding quality to use when encoding images. For the lowest supported quality, pass
0.0. For the highest supported quality, pass1.0.
Discussion
If the target image format does not support variable-quality encoding, the value of the encodingQuality argument is ignored.
If contentType does not conform to UTType.image, the result is undefined.