lib/sugarcube/uiimage.rb in sugarcube-0.19.2 vs lib/sugarcube/uiimage.rb in sugarcube-0.19.4

- old
+ new

@@ -319,11 +319,11 @@ # Accepts two options: brightness (default: -0.5) and saturation (default: -0.2) # Returns a darkened version of the image. def darken(options={}) filter_name = 'CIColorControls' filter_options = { - inputBrightness: options[:brightness] || -0.5, - inputSaturation: options[:saturation] || -0.2, + inputBrightness: options[:brightness] || 0, + inputSaturation: options[:saturation] || 0, } cg_input_image = CIImage.alloc.initWithImage(self) darken_filter = CIFilter.filterWithName(filter_name) raise Exception.new("Filter not found: #{filter_name}") unless darken_filter