SAMCoreImageView
https://github.com/soffes/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!
使用OpenGL渲染CIImage,速度太快,就好像用大炮打蚊子般浪费。在模拟器上跑你看不到这种优化的效果,但如果在真机上跑,妈的,实在是太快了。
灵感来自于TLDFastCoreImageView by Patrick Gibson,感谢Patrick这个基佬。
Usage
SAMCoreImageView *imageView = [[SAMCoreImageView alloc] init];
imageView.image = [someFilter outputImage];
SAMCoreImageView's contentMode
behaves just like UIImageView's so go nuts. Internally, it usesSAMContentMode to do its magic.
SAMCoreImageView的contentMode与UIImageView中的contentMode类似哦。说实话,他是用的SAMContMode来实现这个效果的。
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.
SAMCoreImageView唯一做的不好的地方就是重新设置尺寸。如果你需要重新设置view的尺寸,我建议你销毁它,然后在初始化个新的。如今我在修复这个问题,但还没找到解决方案......