Enumeration

XCTAttachment.ImageQuality

Compression quality options for image-based attachments.

Declaration

enum ImageQuality : Int

Topics

Quality Settings

case original

Original image quality, represented as a lossless PNG image.

case medium

Medium image quality, represented as a high quality lossy JPEG image.

case low

Low image quality, represented as a highly compressed lossy JPEG image.

See Also

Creating Attachments from Images and Screenshots

init(image: UIImage)

Creates an attachment containing a PNG representation of the provided image.

init(image: UIImage, quality: XCTAttachment.ImageQuality)

Creates an attachment containing a representation of the provided image at the requested image quality.

init(screenshot: XCUIScreenshot)

Creates an attachment containing a PNG representation of the provided screenshot.

init(screenshot: XCUIScreenshot, quality: XCTAttachment.ImageQuality)

Creates an attachment containing a representation of the provided screenshot at the requested image quality.

class XCUIScreenshot

A captured image of a screen, app, or UI element state.