Skip to content

Commit d0fe478

Browse files
authored
Fix a diagnostic logged by ImageIO on Darwin when attaching an image. (#1539)
We're passing a boxed C enum value to `CGImageDestinationAddImage()` that causes ImageIO to warn. Fix is to pass its raw value instead. Resolves rdar://170149329. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent a849353 commit d0fe478

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Overlays/_Testing_CoreGraphics/Attachments/AttachableAsCGImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ extension AttachableAsCGImage {
103103
let scaleFactor = attachmentScaleFactor
104104
let properties: [CFString: Any] = [
105105
kCGImageDestinationLossyCompressionQuality: CGFloat(imageFormat.encodingQuality),
106-
kCGImagePropertyOrientation: orientation,
106+
kCGImagePropertyOrientation: orientation.rawValue,
107107
kCGImagePropertyDPIWidth: 72.0 * scaleFactor,
108108
kCGImagePropertyDPIHeight: 72.0 * scaleFactor,
109109
]

0 commit comments

Comments
 (0)