Ralf Ebert

Results 17 comments of Ralf Ebert

Following two very experimental code examples for achieving something like this. First, the following script iterates all mails via the xapian index and if a mail is in SOURCE_INBOX but...

Also having this issue, CoreGraphics seems to render non-deterministic when it comes to anti aliasing, at least I get pixel values off +/- 1 or 2 with the exact same...

The quickest way seems to be just to compare the bytes manually: ``` let d1 = referenceImageContext.data! let d2 = imageContext.data! for i in 0.. tolerance { throw CompareError.notEquals }...

Hmm, I see the point. The context for this was that I added a few more image asserts to a test and I wanted to record just these images without...

I have a method that generates a cgPath and I want to test it by drawing it using the UIGraphicsImageRenderer in specific configurations. And comparing images might be useful outside...

This needs a bit more work, it doesn't seem to capture Retina images. Also I added some code to capture SpriteKit views in the hierarchy via a workaround: it adds...

I found that all these cases can be handled easily by using the UIView snapshotView method. It returns a "image" view which can be drawn using drawHierarchy and always shows...

Ahh, big relevation: drawHierarchy works fine! But currently, Snap renders the layer of the view on top of the view in UIView+Render: ```` drawHierarchy(in: bounds, afterScreenUpdates: true) layer.render(in: context) //

Ah, drawHierarchy only works when a UIWindow is present, thats why layer.render is there as well. But I think rendering twice, once using drawHierarchy, then on top of it as...

Having the same problem - the permission error is currently unhandled: https://github.com/twostraws/CodeScanner/blob/main/Sources/CodeScanner/CodeScanner.swift#L172