Skip to content

soffes/SAMCoreImageView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMCoreImageView

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!

Usage

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.

Running the Example

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.

Limitations

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.