Class | Fleximage::Operator::UnsharpMask |
In: |
lib/fleximage/operator/unsharp_mask.rb
|
Parent: | Operator::Base |
Sharpen an image using an unsharp mask filter.
image.unsharp_mask(options = {})
Use the following keys in the options hash:
Example:
@photo.operate do |image| image.unsharp_mask end
# File lib/fleximage/operator/unsharp_mask.rb, line 21 21: def operate(options = {}) 22: options = options.symbolize_keys if options.respond_to?(:symbolize_keys) 23: options = { 24: :radius => 0.0, 25: :sigma => 1.0, 26: :amount => 1.0, 27: :threshold => 0.05 28: }.merge(options) 29: 30: # sharpen image 31: @image = @image.unsharp_mask(options[:radius], options[:sigma], options[:amount], options[:threshold]) 32: end