Contents

init(image:)

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

Declaration

convenience init(image: UIImage)
convenience init(image: NSImage)

Parameters

  • image:

    The image to wrap as an attachment.

Discussion

Creates an attachment with a uniformTypeIdentifier of "public.png". Equivalent to calling init(image:quality:) with a quality value of XCTAttachment.ImageQuality.original.

See Also

Creating Attachments from Images and Screenshots