Post

Replies

Boosts

Views

Activity

Reply to Visualization Kernel for Optical Flow
Did you get any further on this? I am interested in using optical flow to interpolated between to images. I go the basic to work and got a VNPixelBufferObservation back. As I understand it it is supposed to contain two float values for each pixel describing how it moves. But while I can print out the values they don't make much sense. Did you get it to work? Sten
Oct ’20
Reply to Undefined symbols for architecture x86_64 UIMarkupTextPrintFormatter Mac OS Catalyst
I have the same problem. But I was able to get around it by using Swift's functions to convert html to attributed text and then use UISimpleTextPrintFormatter with the attributed text.My original code:let formatter = UIMarkupTextPrintFormatter(markupText: htmlString) formatter.perPageContentInsets = UIEdgeInsets(top: 70.0, left: 60.0, bottom: 70.0, right: 60.0) printController.printFormatter = formatter printController.present(animated: true, completionHandler: nil)Working on Catalyst (and iOS):guard let printData = htmlString.data(using: String.Encoding.utf8) else { return } do { let printText = try NSAttributedString(data: printData, options: [.documentType: NSAttributedString.DocumentType.html, .characterEncoding: String.Encoding.utf8.rawValue], documentAttributes: nil) let formatter = UISimpleTextPrintFormatter(attributedText: printText) formatter.perPageContentInsets = UIEdgeInsets(top: 70.0, left: 60.0, bottom: 70.0, right: 60.0) printController.printFormatter = formatter printController.present(animated: true, completionHandler: nil) } catch { print(error) }However, the NSAttributedString(data: ) seems to be more sensitive to what you throw at it on Catalyst than on iOS. For example, did I have problems with tables that worked fine on iOS. So it is not a perfect solution.
Dec ’19