merged in from code from the other master
[selectricity-live] / vendor / plugins / attachment_fu / vendor / red_artisan / core_image / filters / color.rb
1 module RedArtisan
2   module CoreImage
3     module Filters
4       module Color
5         
6         def greyscale(color = nil, intensity = 1.00)
7           create_core_image_context(@original.extent.size.width, @original.extent.size.height)
8           
9           color = OSX::CIColor.colorWithString("1.0 1.0 1.0 1.0") unless color
10           
11           @original.color_monochrome :inputColor => color, :inputIntensity => intensity do |greyscale|
12             @target = greyscale
13           end
14         end
15         
16         def sepia(intensity = 1.00)
17           create_core_image_context(@original.extent.size.width, @original.extent.size.height)
18           
19           @original.sepia_tone :inputIntensity => intensity do |sepia|
20             @target = sepia
21           end
22         end
23         
24       end
25     end
26   end
27 end

Benjamin Mako Hill || Want to submit a patch?