Method: UIImage#apply_filter
- Defined in:
- lib/sugarcube-image/uiimage.rb
#apply_filter(filter) ⇒ Object
Returns a CIImage with the filter applied to the receiver. The return value
is a CIImage object, which also defines | to work the same way, so filters
can be chained.
319 320 321 322 |
# File 'lib/sugarcube-image/uiimage.rb', line 319 def apply_filter(filter) filter.setValue(self.ciimage, forKey: 'inputImage') return filter.valueForKey('outputImage') end |