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
Reply to 'ExtensionFoundation/EXMacros.h' file not found
Nevermind. I found a strange build setting in my build, deleting which removed the build error.
Replies
Boosts
Views
Activity
Sep ’24
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.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Alternative to `writeHEIF10Representation` for writing a `CIImage` to HEIF10
Following up, Apple fixed this issue in macOS 13.3. Concurrent calls to CIContext.writeHEIF10Representation no longer crash. Thanks, Apple!
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
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:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Slow framework unit test failure (~5s)
I'm seeing the same behavior. It's a big hit to productivity, and of course it discourages running the test suite. Have you had any luck figuring this out?
Replies
Boosts
Views
Activity
Jan ’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:
Replies
Boosts
Views
Activity
Dec ’21
Reply to SwiftUI app outputting CVDisplayLink related messages to console?
I've started seeing these messages after upgrading to Monterey 12.1. Ugh.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Xcode 13.2 - Internal error : Missing Package Description Module
Me, too. Apple!!!
Replies
Boosts
Views
Activity
Dec ’21
Reply to Xcode 13 beta not showing local source control diffs on Big Sur 11.4
I finally figured this out. Open Xcode preferences, go to the Source Control pane, in "Text Editing:" enable "Show Source Control changes". Then the diff view will work again. I think this setting should be on by default. I spent way too much time trying to figure this out.
Replies
Boosts
Views
Activity
Jul ’21