4 public func writePNG(toURL url: URL) {
6 guard let data = tiffRepresentation,
7 let rep = NSBitmapImageRep(data: data),
8 let imgData = rep.representation(
9 using: .png, properties: [.compressionFactor: NSNumber(floatLiteral: 1.0)])
13 "\(self.self) Error Function '\(#function)' Line: \(#line) No tiff rep found for image writing to \(url)"
19 try imgData.write(to: url)
22 "\(self.self) Error Function '\(#function)' Line: \(#line) \(error.localizedDescription)")