Archive for May 22, 2023

Monday, May 22, 2023

SwiftUICoreImage

Dan Wood:

Core Image is a wonderful image-processsing toolkit in macOS and iOS, but it’s a bit clunky to use. Even after Apple added Swift APIs to many of the filters (CoreImage.CIFilterBuiltins), it’s still pretty tedious to chain filters to images.

The purpose of this package is to provide an easier way to chain multiple filters to CIImage instances and then render them into SwiftUI (or any other context — SwiftUI is not needed).

[…]

Similarly to how SwiftUI view modifiers each return a modified View instance, these modifiers on CIImage take care of the core image chaining by creating a corresponding CIFilter, hooking up the inputImage for you, and returning the resulting outputImage.

[…]

The contents of CIImage-Filters.swift are generated source code, using code that I’ve included in this repository (CIImage-Generation.swift, not included in the package import). This loops through the core image metadata that Apple provides (CIFilter.filterNames(inCategories: nil)). Unfortunately this list is somewhat out of date and contains a number of inconsistencies that I’ve done my best to overcome.

Monduo 16-Inch Pro Duo

Eric Slivka:

The $800 Monduo Pro Duo isn’t the only dual portable external display accessory on the market, but of the major ones I’ve seen it comes the closest to approaching the high-end specs of the built-in displays on Apple’s notebooks. Optimized for 16-inch laptops like Apple’s larger MacBook Pro, the Pro Duo’s displays each measure in at a very similar 16 inches, with 100% DCI-P3 color support, 2560 ✕ 1600 resolution on each display, 500 nits of brightness, and variable refresh up to 144Hz.

[…]

That gives it a bit larger footprint than my 16-inch MacBook Pro while being slightly lighter, but it’s nearly twice as thick. Still, if you have a spacious computer bag with a couple of compartments as I do, there’s a chance the Pro Duo could slide right in there.

[…]

Once everything is physically connected, you’ll need to download the Monduo app, which manages the display drivers to support high-resolution options and synchronization with the built-in display.

I don’t understand why, even with USB-C, all these portable displays seem to need drivers. I ended up giving up on the AOC display because the drivers didn’t always work and seemed to cause crashes.

Previously:

Setting Up Sparkle

Sarah Reichelt:

Sparkle is an open-source update framework for macOS. It’s very popular and I’m sure you will have seen it used, even if you didn’t recognise it. But setting it up isn’t totally straight-forward, at least I didn’t find it so, which I why I’m using this post to document the process.

[…]

The Sparkle documentation is excellent and contains everything you need to know, but they allow for a wide range of use cases and configurations, which makes it difficult to follow at times.

[…]

Adding Sparkle to a sandboxed app requires some more steps[…]

[…]

Drag the image file into your disk image. Don’t worry about positioning it - you’re about to make the file invisible.

DropDMG is an easier way to create a disk image with a background picture, and it will code sign the .dmg file, too.

Previously: