AttachableImageFormat
A type describing image formats supported by the system that can be used when attaching an image to a test.
Declaration
struct AttachableImageFormatOverview
When you attach an image to a test, you can pass an instance of this type to record(_:named:as:sourceLocation:) so that the testing library knows the image format you’d like to use. If you don’t pass an instance of this type, the testing library infers which format to use based on the attachment’s preferred name.
The testing library always supports the PNG and JPEG image formats. The set of additional supported image formats is platform-specific:
On Apple platforms, you can use CGImageDestinationCopyTypeIdentifiers() from the Image I/O framework to determine which formats are supported.
On Windows, you can use IWICImagingFactory.CreateComponentEnumerator() to enumerate the available image encoders.