Render a CIImage in an OpenGL thingy so it's real fast and junk. You won't see any speed up on the simulator, but on the device it's nuts fast.
This is was inspired by TLDFastCoreImageView by Patrick Gibson. Thanks Patrick!
SAMCoreImageView *imageView = [[SAMCoreImageView alloc] init];
imageView.image = [someFilter outputImage];
SAMCoreImageView's contentMode
behaves just like UIImageView's so go nuts. Internally, it uses SAMContentMode to do its magic.
cd
into the Example
directory and run pod install
. Then open Example.xcworkspace
and build like normal. The performance on the simulator isn't great. Try it on a device.
The only thing SAMCoreImageView doesn't do well is resizing. If you need to resize the view, I recommend destroying it and making a new one for now. I started working on a fix for this, but couldn't get it to work right just yet.