Skip to content
This repository
tree: d971859124
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 25 lines (20 sloc) 0.754 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
module RedArtisan
  module CoreImage
    module Filters
      module Quality
        
        def reduce_noise(level = 0.02, sharpness = 0.4)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)
          
          @original.noise_reduction :inputNoiseLevel => level, :inputSharpness => sharpness do |noise_reduced|
            @target = noise_reduced
          end
        end
        
        def adjust_exposure(input_ev = 0.5)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)
          
          @original.exposure_adjust :inputEV => input_ev do |adjusted|
            @target = adjusted
          end
        end
        
      end
    end
  end
end
Something went wrong with that request. Please try again.