Posts

Post not yet marked as solved
3 Replies
1.3k Views
I've looked in multiple places online, including here in the forums where a somewhat similar question is asked (and never answered :( ) but i'm going to ask anyway: vImage, Metal Performance Shaders, and Core Image all have a big overlap in the kinds of operations they perform on image data. But none of supporting materials (documentation, WWDC session videos, help) ever seem to bother with paying much heed to even the existence of the others when talking about themselves. For example, Core Image talks about how efficient and fast it is. MPS talks about everything being "hand rolled" to be optimized for the hardware its running on. Which means yes, fast and efficient. and vImage talks about being fast and..yup, energy-saving. But I and other have very little to go on as to when vImage makes sense over MPS. Or Core Image. If I have a large set of images and I want to get the mean color value of each image and i want to equalize or adjust the histogram of each, or perform some other color operation on each in the set, for example, which is best? I hope someone from Apple -- preferably multiple people from the multiple teams that work on these multiple technologies -- can help clear some of this up?
Posted Last updated
.
Post not yet marked as solved
0 Replies
851 Views
I want to apply a given CIFilter but instead of the effect showing up instantly, I want to animate it: e.g., a color image desaturating to grey scale over 2 seconds, a blocky image depixellating to a full-resolution image using an EaseInOut animation curve over 0.8 seconds. If you're using one of the built in SwiftUI view modifiers like .blur(), you're golden. Just append some .animate() and you're done. But given that you have to jump through hoops whether you go the UIImage, CGImage, CIImage route, or the MTLView, CIRenderDestination, ContentView example from the WWDC 2022 sample code, I'm a bit confused. Ideally I guess I'd just like to write View Modifiers for each effect I want to do, so that they're as usable as the SwiftUI built-in ones, but I don't know if that's possible. Does anyone have any ideas?
Posted Last updated
.