falu 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f6c9808cc4dcfddff43b93739a9cabee4ee04da
4
- data.tar.gz: 1569c19f1db1019514d1a26e3838a287b9ce2ee0
3
+ metadata.gz: a596b1571462637d99273b711c2489641d3f1409
4
+ data.tar.gz: 91424364b332d0ea3b345bf53c9406ef65c2db0f
5
5
  SHA512:
6
- metadata.gz: 802d7c5a94848223db5d629bc06155f6041da6735b17c391779da13b51e8dc6b77fae4432fb08e3388f41be7530e37a1b8816bf328898a846b96f9b87b0200f6
7
- data.tar.gz: fff176616ebfc90bdc8480a279f1b0228876380dcb43e09d498a71bf95d3d19cc21a93d64cfaa671bf620b2d583bc8a6034249cbc31b3f7d3cb146a2ba7e28ab
6
+ metadata.gz: ed9b2293b5f5efb04d6d65597f47ea15773011138d4705dd056879c6e367fd7966ab531e996c22d3318fea9d2e5a349811ae4f2c60a78b178d935debf3304297
7
+ data.tar.gz: f3642a9ec4e03309a3ab1ea6e15216f3d09b7128d932c1d61deef1a7c399145480143d2ae2ea28ac3fca56aed7e2f5a8809f80e970632d0f63e9c64e8ee35aea
data/lib/falu/image.rb CHANGED
@@ -80,10 +80,10 @@ module Falu
80
80
 
81
81
  def sample(x=0, y=0, w=nil, h=nil, size: 10, sample: false, &block)
82
82
  palette = {}
83
- pixels(x, y, w, h, size: size, sample: sample) do |x,y,color|
84
- palette[color] ||= 0
85
- palette[color] += 1
86
- yield(color) if block_given?
83
+ pixels(x, y, w, h, size: size, sample: sample) do |x,y,rgb,hex|
84
+ palette[hex] ||= 0
85
+ palette[hex] += 1
86
+ yield(hex) if block_given?
87
87
  end
88
88
  palette.to_a.to_enum
89
89
  end
data/lib/falu/version.rb CHANGED
@@ -2,7 +2,7 @@ module Falu
2
2
  module Version
3
3
  MAJOR = '0'
4
4
  MINOR = '0'
5
- PATCH = '1'
5
+ PATCH = '2'
6
6
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
 
8
8
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec