Post

Replies

Boosts

Views

Activity

Reply to Any better way to write multi-family Widget #Preview macro?
You can probably do this with something like a ForEach macro. I imagine the syntax would look something like #ForEach(arrayOfStuff) { thing in #Preview(thing.description, as: thing) { DailyCaffeineWidth() } timelineProvider: { previewTimelineProvider() } } I don't have a macro ForEach handy, but it's probably something someone has written. Or you can write your own as a fun exercise. Good luck.
May ’24
Reply to CIRawFilter And Values Greater Than 1.0
When you load your RAW file with CIRAWFilter, try setting boostAmount to 0. It's 1 by default. From my experience, this gives a linear response when changing exposure. You can still get values greater than 1 if, for example, you increase the exposure enough. Try setting baselineExposure and exposure to 0. In this era of EDR and HDR, I wouldn't consider values greater than 1 to be anything abnormal. If you don't want values greater than 1, you can clamp or otherwise map them to less than or equal to 1 when rendering. I suggest you avoid doing any kind of color value clipping in your core image processing pipeline (i.e. CIFilters and custom kernels). Does this answer your question?
Topic: Media Technologies SubTopic: General Tags:
Feb ’24
Reply to Alternative to `writeHEIF10Representation` for writing a `CIImage` to HEIF10
Hi Frank. I have tried using one CIContext per thread as well as sharing one across threads. I've posted a dead simple Xcode workspace illustrating the crash with simple Swift and Objc apps at https://github.com/mallman/ConcurrentCoreImageHEIF10. Since there are many relevant threads with different stack traces when the app crashes, a screenshot of a single thread's stack trace really isn't very informative. I hope the project is helpful.
Topic: Media Technologies SubTopic: General Tags:
Nov ’22
Reply to SwiftUI app outputting CVDisplayLink related messages to console?
As a rather blunt "workaround", you can hide all of these system logging messages by setting OS_ACTIVITY_MODE=disable as an environment variable in the Scheme you use to run your app. Of course, this will disable all system log messages, including ones that are actually helpful. But I don't know of a more precise way to just turn off messages from specific subsystems. That would be nice.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21