Skip to content

Commit

Permalink
More unmanaged color
Browse files Browse the repository at this point in the history
  • Loading branch information
pcuenca committed Sep 10, 2024
1 parent cd52a1a commit 441105c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SAM2-Demo/Common/CoreImageExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension CIContext {

/// Writes the image as a PNG.
func writePNG(_ image: CIImage, to url: URL) {
let outputCGImage = createCGImage(image, from: image.extent)!
let outputCGImage = createCGImage(image, from: image.extent, format: .BGRA8, colorSpace: nil)!
guard let destination = CGImageDestinationCreateWithURL(url as CFURL, UTType.png.identifier as CFString, 1, nil) else {
fatalError("Failed to create an image destination.")
}
Expand Down

0 comments on commit 441105c

Please sign in to comment.