Sha256: 943a81f993d458290aeb483dcc07b1b8a288e7aec1e605130555b3712ad8ce2f

Contents?: true

Size: 753 Bytes

Versions: 68

Compression:

Stored size: 753 Bytes

Contents

module RedArtisan
  module CoreImage
    module Filters
      module Color

        def greyscale(color = nil, intensity = 1.00)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)

          color = OSX::CIColor.colorWithString("1.0 1.0 1.0 1.0") unless color

          @original.color_monochrome :inputColor => color, :inputIntensity => intensity do |greyscale|
            @target = greyscale
          end
        end

        def sepia(intensity = 1.00)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)

          @original.sepia_tone :inputIntensity => intensity do |sepia|
            @target = sepia
          end
        end

      end
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
refinerycms-0.9.7.15 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.14 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.13 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.11 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.10 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.9 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.8 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.7 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.6 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.5 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.4 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.3 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.2 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7.1 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.7 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
jacobat-refinerycms-0.9.6.14 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.6.34 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.6.33 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.6.32 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
refinerycms-0.9.6.31 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb