Sha256: 7d17f30357b9208d3a1891b7bc04e40a64b046e3938b54a69d870d3e80ea4ace

Contents?: true

Size: 292 Bytes

Versions: 3

Compression:

Stored size: 292 Bytes

Contents

class SmartAss::YCbCrConverter
  attr_reader :matrix

  def initialize(matrix)
    @matrix = SmartAss.const_get("#{matrix.upcase}ColorMatrix".to_sym).new
  end

  def to_ycbcr(*rgb)
    matrix.to_ycbcr_from_rgb(*rgb)
  end

  def to_rgb(*ycbcr)
    matrix.to_rgb_from_ycbcr(*ycbcr)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smart_ass-0.3.0 lib/smart_ass/ycbcr_converter.rb
smart_ass-0.2.0 lib/smart_ass/ycbcr_converter.rb
smart_ass-0.1.0 lib/smart_ass/ycbcr_converter.rb