chunky_png 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,5 +1,5 @@
1
1
  .DS_Store
2
- spec/resources/testing.png
2
+ spec/resources/_*.png
3
3
  /pkg
4
4
  /tmp
5
5
  /doc
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
 
4
4
  # Do not change the version and date fields by hand. This will be done
5
5
  # automatically by the gem release script.
6
- s.version = "0.0.3"
6
+ s.version = "0.0.4"
7
7
  s.date = "2010-01-13"
8
8
 
9
9
  s.summary = "Pure ruby library for read/write, chunk-level access to PNG files"
@@ -20,6 +20,6 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # Do not change the files and test_files fields by hand. This will be done
22
22
  # automatically by the gem release script.
23
- s.files = %w(spec/spec_helper.rb spec/resources/gray_10x10_grayscale.png spec/resources/gray_10x10.png .gitignore spec/resources/gray_10x10_truecolor_alpha.png lib/chunky_png/pixel_matrix.rb LICENSE spec/resources/gray_10x10_truecolor.png lib/chunky_png/pixel_matrix/decoding.rb lib/chunky_png/chunk.rb spec/unit/encoding_spec.rb Rakefile spec/resources/transparent_gray_10x10.png README.rdoc spec/resources/gray_10x10_indexed.png spec/resources/16x16_non_interlaced.png spec/integration/image_spec.rb lib/chunky_png/pixel.rb lib/chunky_png/palette.rb lib/chunky_png/datastream.rb chunky_png.gemspec tasks/github-gem.rake spec/unit/decoding_spec.rb spec/resources/gray_10x10_grayscale_alpha.png spec/resources/16x16_interlaced.png spec/resources/adam7.png lib/chunky_png/pixel_matrix/encoding.rb lib/chunky_png/image.rb spec/unit/pixel_spec.rb spec/unit/pixel_matrix_spec.rb lib/chunky_png.rb)
23
+ s.files = %w(spec/spec_helper.rb spec/resources/pixelstream.rgb spec/resources/gray_10x10_grayscale.png spec/resources/gray_10x10.png .gitignore spec/resources/gray_10x10_truecolor_alpha.png lib/chunky_png/pixel_matrix.rb LICENSE spec/resources/gray_10x10_truecolor.png lib/chunky_png/pixel_matrix/decoding.rb lib/chunky_png/chunk.rb spec/unit/encoding_spec.rb spec/resources/operations.png Rakefile spec/resources/transparent_gray_10x10.png README.rdoc spec/resources/gray_10x10_indexed.png spec/resources/16x16_non_interlaced.png spec/integration/image_spec.rb lib/chunky_png/pixel_matrix/operations.rb lib/chunky_png/pixel.rb lib/chunky_png/palette.rb lib/chunky_png/datastream.rb chunky_png.gemspec tasks/github-gem.rake spec/unit/decoding_spec.rb spec/resources/pixelstream_reference.png spec/resources/gray_10x10_grayscale_alpha.png spec/resources/16x16_interlaced.png spec/resources/adam7.png lib/chunky_png/pixel_matrix/encoding.rb lib/chunky_png/image.rb spec/unit/pixel_spec.rb spec/unit/pixel_matrix_spec.rb lib/chunky_png.rb)
24
24
  s.test_files = %w(spec/unit/encoding_spec.rb spec/integration/image_spec.rb spec/unit/decoding_spec.rb spec/unit/pixel_spec.rb spec/unit/pixel_matrix_spec.rb)
25
25
  end
@@ -7,6 +7,7 @@ require 'chunky_png/palette'
7
7
  require 'chunky_png/pixel'
8
8
  require 'chunky_png/pixel_matrix/encoding'
9
9
  require 'chunky_png/pixel_matrix/decoding'
10
+ require 'chunky_png/pixel_matrix/operations'
10
11
  require 'chunky_png/pixel_matrix'
11
12
  require 'chunky_png/image'
12
13
 
@@ -58,7 +58,7 @@ module ChunkyPNG
58
58
  # @param [ChunkyPNG::PixelMatrix] pixel_matrix The pixel matrix to create a palette for.
59
59
  # @return [ChunkyPNG::Palette] The palette instance.
60
60
  def self.from_pixel_matrix(pixel_matrix)
61
- self.new(pixel_matrix.pixels)
61
+ self.new(pixel_matrix.pixels.map { |fn| ChunkyPNG::Pixel.new(fn) })
62
62
  end
63
63
 
64
64
  # Builds a palette instance from a given set of pixels.
@@ -1,75 +1,161 @@
1
1
  module ChunkyPNG
2
2
 
3
+ # The Pixel class represents a pixel, which has a single color. Within the
4
+ # ChunkyPNG library, the concepts of pixels and colors are both used, and
5
+ # they are both represented by the pixel class.
6
+ #
7
+ # Pixels/colors are represented in RGBA moduds. Each of the four components
8
+ # is stored with a depth of 8 biths (maximum value = 255). Together, these
9
+ # components are stored in a 4-bye Fixnum.
3
10
  class Pixel
4
-
11
+
12
+ # @return [Fixnum] The 4-byte fixnum representation of the pixel's
13
+ # color, where red compenent uses the most significant byte and the
14
+ # alpha component the least significant byte.
5
15
  attr_reader :value
6
16
 
17
+ alias :to_i :value
18
+
19
+ # Initalizes a new pixel instance. Usually, it is more convenient to
20
+ # use one of the constructors below.
21
+ # @param [Fixnum] value The 4-byte fixnum representation of the pixel's
22
+ # color, where red compenent uses the most significant byte and the
23
+ # alpha component the least significant byte.
7
24
  def initialize(value)
8
- @value = value
25
+ @value = value.to_i
9
26
  end
27
+
28
+ ####################################################################
29
+ # PIXEL LOADING
30
+ ####################################################################
10
31
 
11
- def self.rgb(r, g, b)
12
- rgba(r, g, b, 255)
32
+ # Creates a new pixels using an r, g, b triple.
33
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
34
+ def self.rgb(r, g, b, a = 255)
35
+ rgba(r, g, b, a)
13
36
  end
14
37
 
38
+ # Creates a new pixels using an r, g, b triple and an alpha value.
39
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
15
40
  def self.rgba(r, g, b, a)
16
- new(r << 24 | g << 16 | b << 8 | a)
41
+ self.new(r << 24 | g << 16 | b << 8 | a)
17
42
  end
18
43
 
44
+ # Creates a new pixels using a grayscale teint.
45
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
19
46
  def self.grayscale(teint, a = 255)
20
47
  rgba(teint, teint, teint, a)
21
48
  end
49
+
50
+ # Creates a new pixels using a grayscale teint and alpha value.
51
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
52
+ def self.grayscale_alpha(teint, a)
53
+ rgba(teint, teint, teint, a)
54
+ end
22
55
 
56
+ # Creates a pixel by unpacking an rgb triple from a string
57
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
23
58
  def self.from_rgb_stream(stream)
24
59
  self.rgb(*stream.unpack('C3'))
25
60
  end
26
61
 
62
+ # Creates a pixel by unpacking an rgba triple from a string
63
+ # @return [ChunkyPNG::Pixel] The newly constructed pixel.
27
64
  def self.from_rgba_stream(stream)
28
65
  self.rgba(*stream.unpack('C4'))
29
66
  end
30
67
 
68
+ ####################################################################
69
+ # COLOR CONSTANTS
70
+ ####################################################################
71
+
72
+ BLACK = rgb( 0, 0, 0)
73
+ WHITE = rgb(255, 255, 255)
74
+
75
+ TRANSPARENT = rgba(0, 0, 0, 0)
76
+
77
+ ####################################################################
78
+ # PROPERTIES
79
+ ####################################################################
80
+
81
+ # Returns the red-component from the pixel value
82
+ # @return [Fixnum] A value between 0 and 255
31
83
  def r
32
84
  (@value & 0xff000000) >> 24
33
85
  end
34
86
 
87
+ # Returns the green-component from the pixel value
88
+ # @return [Fixnum] A value between 0 and 255
35
89
  def g
36
90
  (@value & 0x00ff0000) >> 16
37
91
  end
38
92
 
93
+ # Returns the blue-component from the pixel value
94
+ # @return [Fixnum] A value between 0 and 255
39
95
  def b
40
96
  (@value & 0x0000ff00) >> 8
41
97
  end
42
98
 
99
+ # Returns the alpha channel value for the pixel
100
+ # @return [Fixnum] A value between 0 and 255
43
101
  def a
44
102
  @value & 0x000000ff
45
103
  end
46
104
 
105
+ # Returns true if this pixel is fully opaque
106
+ # @return [true, false] True if the alpha channel equals 255
47
107
  def opaque?
48
108
  a == 0x000000ff
49
109
  end
50
110
 
111
+ # Returns true if this pixel is fully transparent
112
+ # @return [true, false] True if the alpha channel equals 0
113
+ def fully_transparent?
114
+ a == 0x000000ff
115
+ end
116
+
117
+ # Returns true if this pixel is fully transparent
118
+ # @return [true, false] True if the r, g and b component are equal
51
119
  def grayscale?
52
120
  r == g && r == b
53
121
  end
54
122
 
123
+ ####################################################################
124
+ # COMPARISON
125
+ ####################################################################
126
+
127
+ # Returns a nice string representation for this pixel using hex notation
128
+ # @return [String]
55
129
  def inspect
56
130
  '#%08x' % @value
57
131
  end
58
132
 
133
+ # Returns a hash for determining the uniqueness of a pixel
134
+ # @return [Fixnum] The hash of the fixnum that is representing this pixel.
59
135
  def hash
60
136
  @value.hash
61
137
  end
62
-
138
+
139
+ # Checks whether to pixels are the same (i.e. have the same color)
140
+ # @param [Object] The object to compare this pixel with
141
+ # @return [true, false] Returns true iff th pixels' fixnum representations is the same
63
142
  def eql?(other)
64
143
  other.kind_of?(self.class) && other.value == self.value
65
144
  end
66
145
 
67
146
  alias :== :eql?
68
147
 
148
+ # Compares to pixels for ordering, using the pixel's fixnum representation.
149
+ # @param [Object] The object to compare this pixel with.
150
+ # @return [Fixnum] A number used for sorting.
69
151
  def <=>(other)
70
152
  other.value <=> self.value
71
153
  end
72
154
 
155
+ ####################################################################
156
+ # CONVERSIONS
157
+ ####################################################################
158
+
73
159
  def to_truecolor_alpha_bytes
74
160
  [r,g,b,a]
75
161
  end
@@ -78,10 +164,6 @@ module ChunkyPNG
78
164
  [r,g,b]
79
165
  end
80
166
 
81
- def index(palette)
82
- palette.index(self)
83
- end
84
-
85
167
  def to_indexed_bytes(palette)
86
168
  [index(palette)]
87
169
  end
@@ -94,11 +176,88 @@ module ChunkyPNG
94
176
  [r, a] # Assumption: r == g == b
95
177
  end
96
178
 
97
- BLACK = rgb( 0, 0, 0)
98
- WHITE = rgb(255, 255, 255)
179
+ ####################################################################
180
+ # ALPHA COMPOSITION
181
+ ####################################################################
99
182
 
100
- TRANSPARENT = rgba(0, 0, 0, 0)
183
+ # Multiplies two fractions using integer math, where the fractions are stored using an
184
+ # integer between 0 and 255. This method is used as a helper method for compositing
185
+ # pixels when using integer math.
186
+ #
187
+ # @param [Fixnum] a The first fraction.
188
+ # @param [Fixnum] b The second fraction.
189
+ # @return [Fixnum] The result of the multiplication.
190
+ def int8_mult(a, b)
191
+ t = a * b + 0x80
192
+ ((t >> 8) + t) >> 8
193
+ end
194
+
195
+ # Composes two pixels with an alpha channel using integer math.
196
+ #
197
+ # The pixel instance is used as background color, the pixel provided as +other+
198
+ # parameter is used as foreground pixel in the composition formula.
199
+ #
200
+ # This version is faster than the version based on floating point math, so this
201
+ # compositing function is used by default.
202
+ #
203
+ # @param [ChunkyPNG::Pixel] other The foreground pixel to compose with
204
+ # @return [ChunkyPNG::Pixel] The composited pixel
205
+ # @see ChunkyPNG::Pixel#compose_precise
206
+ def compose_quick(other)
207
+ if other.a == 0xff
208
+ other
209
+ elsif other.a == 0x00
210
+ self
211
+ else
212
+ a_com = int8_mult(0xff - other.a, a)
213
+ new_r = int8_mult(other.a, other.r) + int8_mult(a_com, r)
214
+ new_g = int8_mult(other.a, other.g) + int8_mult(a_com, g)
215
+ new_b = int8_mult(other.a, other.b) + int8_mult(a_com, b)
216
+ new_a = other.a + a_com
217
+ ChunkyPNG::Pixel.rgba(new_r, new_g, new_b, new_a)
218
+ end
219
+ end
220
+
221
+ # Composes two pixels with an alpha channel using floating point math.
222
+ #
223
+ # The pixel instance is used as background color, the pixel provided as +other+
224
+ # parameter is used as foreground pixel in the composition formula.
225
+ #
226
+ # This method uses more precise floating point math, but this precision is lost
227
+ # when the result is converted back to an integer. Because it is slower than
228
+ # the version based on integer, math, that version is preferred.
229
+ #
230
+ # @param [ChunkyPNG::Pixel] other The foreground pixel to compose with
231
+ # @return [ChunkyPNG::Pixel] The composited pixel
232
+ # @see ChunkyPNG::Pixel#compose_quick
233
+ def compose_precise(other)
234
+ if other.a == 255
235
+ other
236
+ elsif other.a == 0
237
+ self
238
+ else
239
+ alpha = other.a / 255.0
240
+ other_alpha = a / 255.0
241
+ alpha_com = (1.0 - alpha) * other_alpha
242
+
243
+ new_r = (alpha * other.r + alpha_com * r).round
244
+ new_g = (alpha * other.g + alpha_com * g).round
245
+ new_b = (alpha * other.b + alpha_com * b).round
246
+ new_a = ((alpha + alpha_com) * 255).round
247
+ ChunkyPNG::Pixel.rgba(new_r, new_g, new_b, new_a)
248
+ end
249
+ end
250
+
251
+ alias :compose :compose_quick
252
+ alias :& :compose
253
+
254
+ ####################################################################
255
+ # STATIC UTILITY METHODS
256
+ ####################################################################
101
257
 
258
+ # Returns the size in bytes of a pixel whe it is stored using a given color mode
259
+ # @param [Fixnum] color_mode The color mode in which the pixels are stored
260
+ # @return [Fixnum] The number of bytes used per pixel in a datastream.
102
261
  def self.bytesize(color_mode)
103
262
  case color_mode
104
263
  when ChunkyPNG::COLOR_INDEXED then 1
@@ -1,19 +1,24 @@
1
1
  module ChunkyPNG
2
2
 
3
- # The ChunkPNG::PixelMatrix class represents a matrix of pixels of which an i
4
- # mage consists. This class supports loading a PixelMatrix from a PNG datastream,
3
+ # The ChunkPNG::PixelMatrix class represents a matrix of pixels of which an
4
+ # image consists. This class supports loading a PixelMatrix from a PNG datastream,
5
5
  # and creating a PNG datastream bse don this matrix.
6
6
  #
7
7
  # This class offers per-pixel access to the matrix by using x,y coordinates. It uses
8
8
  # a palette (see {ChunkyPNG::Palette}) to keep track of the different colors used in
9
9
  # this matrix.
10
10
  #
11
+ # The pixels in the matrix are stored as 4-byte fixnums. When accessing these pixels,
12
+ # these Fixnums are wrapped in a {ChunkyPNG::Pixel} instance to simplify working with them.
13
+ #
11
14
  # @see ChunkyPNG::Datastream
12
15
  class PixelMatrix
13
16
 
14
17
  include Encoding
15
18
  extend Decoding
16
19
 
20
+ include Operations
21
+
17
22
  # @return [Integer] The number of columns in this pixel matrix
18
23
  attr_reader :width
19
24
 
@@ -38,20 +43,26 @@ module ChunkyPNG
38
43
  @width, @height = width, height
39
44
 
40
45
  if initial.kind_of?(ChunkyPNG::Pixel)
41
- @pixels = Array.new(width * height, initial)
46
+ @pixels = Array.new(width * height, initial.to_i)
42
47
  elsif initial.kind_of?(Array) && initial.size == width * height
43
- @pixels = initial
48
+ @pixels = initial.map(&:to_i)
44
49
  else
45
50
  raise "Cannot use this value as initial pixel matrix: #{initial.inspect}!"
46
51
  end
47
52
  end
48
53
 
54
+ # Returns the size ([width, height]) for this matrix.
55
+ # @return Array An array with the width and height of this matrix as elements.
56
+ def size
57
+ [@width, @height]
58
+ end
59
+
49
60
  # Replaces a single pixel in this matrix.
50
61
  # @param [Integer] x The x-coordinate of the pixel (column)
51
62
  # @param [Integer] y The y-coordinate of the pixel (row)
52
63
  # @param [ChunkyPNG::Pixel] pixel The new pixel for the provided coordinates.
53
64
  def []=(x, y, pixel)
54
- @pixels[y * width + x] = pixel
65
+ @pixels[y * width + x] = pixel.to_i
55
66
  end
56
67
 
57
68
  # Returns a single pixel from this matrix.
@@ -59,14 +70,14 @@ module ChunkyPNG
59
70
  # @param [Integer] y The y-coordinate of the pixel (row)
60
71
  # @return [ChunkyPNG::Pixel] The current pixel at the provided coordinates.
61
72
  def [](x, y)
62
- @pixels[y * width + x]
73
+ ChunkyPNG::Pixel.new(@pixels[y * width + x])
63
74
  end
64
75
 
65
76
  # Passes to this matrix of pixels line by line.
66
77
  # @yield [Array<ChunkyPNG::Pixel>] An line of pixels
67
78
  def each_scanline(&block)
68
79
  height.times do |i|
69
- scanline = @pixels[width * i, width]
80
+ scanline = @pixels[width * i, width].map { |fn| ChunkyPNG::Pixel.new(fn) }
70
81
  yield(scanline)
71
82
  end
72
83
  end
@@ -75,7 +86,7 @@ module ChunkyPNG
75
86
  # @return [ChunkyPNG::Palette] A pallete which contains all the colors that are
76
87
  # being used for this image.
77
88
  def palette
78
- ChunkyPNG::Palette.from_pixels(@pixels)
89
+ ChunkyPNG::Palette.from_pixel_matrix(self)
79
90
  end
80
91
 
81
92
  # Converts this PixelMatrix to a datastream, so that it can be saved as a PNG image.
@@ -101,5 +112,25 @@ module ChunkyPNG
101
112
  end
102
113
 
103
114
  alias :== :eql?
115
+
116
+ #################################################################
117
+ # CONSTRUCTORS
118
+ #################################################################
119
+
120
+ def self.from_rgb_stream(width, height, stream)
121
+ pixels = []
122
+ while pixeldata = stream.read(3)
123
+ pixels << ChunkyPNG::Pixel.from_rgb_stream(pixeldata)
124
+ end
125
+ self.new(width, height, pixels)
126
+ end
127
+
128
+ def self.from_rgba_stream(width, height, stream)
129
+ pixels = []
130
+ while pixeldata = stream.read(4)
131
+ pixels << ChunkyPNG::Pixel.from_rgba_stream(pixeldata)
132
+ end
133
+ self.new(width, height, pixels)
134
+ end
104
135
  end
105
136
  end
@@ -0,0 +1,40 @@
1
+ module ChunkyPNG
2
+ class PixelMatrix
3
+ module Operations
4
+ def compose(other, dx = 0, dy = 0)
5
+ check_size_constraints!(other, dx, dy)
6
+
7
+ other.height.times do |y|
8
+ other.width.times do |x|
9
+ self[x+dx, y+dy] = self[x+dx, y+dy] & other[x, y]
10
+ end
11
+ end
12
+ self
13
+ end
14
+
15
+ def replace(other, offset_x = 0, offset_y = 0)
16
+ check_size_constraints!(other, offset_x, offset_y)
17
+
18
+ other.height.times do |y|
19
+ pixels[(y + offset_y) * width + offset_x, other.width] = other.pixels[y * other.width, other.width]
20
+ end
21
+ self
22
+ end
23
+
24
+ def crop(x, y, crop_width, crop_height)
25
+ new_pixels = []
26
+ crop_height.times do |cy|
27
+ new_pixels += pixels.slice((cy + y) * width + x, crop_width)
28
+ end
29
+ ChunkyPNG::PixelMatrix.new(crop_width, crop_height, new_pixels)
30
+ end
31
+
32
+ protected
33
+
34
+ def check_size_constraints!(other, offset_x, offset_y)
35
+ raise "Background image width is too small!" if width < other.width + offset_x
36
+ raise "Background image height is too small!" if height < other.height + offset_y
37
+ end
38
+ end
39
+ end
40
+ end
@@ -8,8 +8,24 @@ describe ChunkyPNG do
8
8
  #
9
9
  # color_mode_id = ChunkyPNG::Chunk::Header.const_get("COLOR_#{color_mode.to_s.upcase}")
10
10
  # filename = resource_file("gray_10x10_#{color_mode}.png")
11
- # File.open(filename, 'w') { |f| image.write(f, :color_mode => color_mode_id) }
11
+ # image.save(filename, :color_mode => color_mode_id)
12
12
  # end
13
13
  # end
14
+
15
+ # it "should create a reference image for operations" do
16
+ # image = ChunkyPNG::Image.new(16, 16, ChunkyPNG::Pixel::WHITE)
17
+ # r = 0
18
+ # image.width.times do |x|
19
+ # g = 0
20
+ # image.height.times do |y|
21
+ # image[x, y] = ChunkyPNG::Pixel.rgb(r, g, 255)
22
+ # g += 16
23
+ # end
24
+ # r += 16
25
+ # end
26
+ # filename = resource_file('operations.png')
27
+ # image.save(filename)
28
+ # # `open #{filename}`
29
+ # end
14
30
  end
15
31
 
@@ -0,0 +1,67 @@
1
+ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ȧ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ooo������������������������������������������������������������������������������������������������������������������������������������������������������������������������������kkk������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ggg'%#
2
+ mJ/iE(qJ-yQ1�kK�xV�mK�cA�[:�[:tL,oI,uR6���������������������tS9qL0{U7sJ+uJ(�a?�gE�_>�\<sL,kC%sL-�_B}Z?xW=&$"������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cccKB;tR7��������������������� ,,,;;;???DDDHHH!!!555���������aC+hI/2! iE)nG)yQ0T2zN+qG'qI*7)07)07)07)07)06(/6(/6(/6(/6(/6(/5'.5'.5'.;-4mK1|X;�\>�]=�dB{R1������������������2/-�\9�^<�cBS;(
3
+ EEE���������������41.xI$wI&pD#oF'
4
+ nJ.�aB�kH�mH�qJ�mG�fC8)08)08)08)06(/7(/8)08)07)07)08)08*19*1=/5yT6�[:T2�d@�nH�jD���������������742�e>�hD�b?{Q1>+���������������������wR4�a@�d@�^7�mE�|S�g>�b9�yP�W�yP�kE�eAB-
5
+ }X:|T4�Z7�b<�zR�|S�tK�zQ�zQ�rI�vP�a=�Y8����������������������Z;�a@�iE�uN�c;�qH�jB�[5�fCmYA��z��s��seiU;*=<<�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ё��vqmxU8������������������666555LLLPPPTTTYYYKKK***
6
+ M4!O4 [>'N7%K6&,3~Z=�]>�`@{R1}S2�V5~T3�V5�fE�mL�jIxM+)�`>�lG�sM�wP�rL�`9�f?���������������741�lE�uN�kE�nK�dCtL- H0cB(pO4}[?�cEV6}Q0�fC�nI�rK�W�yP�g>�kB�h?�h?�h?�vM�~W��[�jF�W3�fD�`@�cD�`B|W9vP2rL.oJ,qK-lG){U7�]?�fH~X:oJ,�[=~X:�dE�gG�eD�dA�]9�`:�jC�c:�vM��W��c��W�_6�vN�qJ�vQ�tP�lI�eC{Q0~U4�X8�V4�_=�oK�{W�wR�W0�nF�uL�yQ�yS�nJ�aA]XJ�޽�����Ÿ��
7
+ [9]95#
8
+ +,,
9
+
10
+ - NYy��� lI-~W7�W4�fB�b>�iE�gC�lH�pL�lH�a=~O+f?!0�a;�f?�f>�g@�qJ�gA���������������631�O(�e>�b<�Z6�[8�_?N5! uP4xT7yT6�Z:xM+}P,yJ%�c>�e>�f>�kB�xO�qH�sJ�wN�{R�xO�zR�oH�R,�R-vH$�[8�W5�X6�X8�\<�X8�X8�_>�a@�`?�jI�`@pF%oE$nD$|R1�Y7�\:�c?�`;�e?�mF�mF�uL�yP��\��W�\3�V-�X0�_8�iB�gA�e?�[6�b>�`=�c?�gC�mH�uP�vP�`9�S+�W/�\3�jA�e>�b?|S2^TE����ҫ�ҫ��y��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������б�����pJ,oI+zT5zT5sN2eD)_@(V9!Q4Q4L1U:%M2P6 N4M3O4W;&Y<'Y='X;$X;#Z<$[;#\: fB%sM0oH*dB&W:#W:#V9"U:$Q8#S9%L3L2N4 K2H.I/M4 H.I/J1M4 K36$*� �,,�76�:9�54�,,�##���kH,}S1�gA�nF�nF�hA�c<�hA�c<�Z3�]5�_8�Z2aA(/�]7�e=�nF�mF�jD���������������631�d=�d=�Z4�`:�^9�_=�\<
11
+ iF,qJ+pH({Q0�S/�Z5�^8�g@�b:�f>�e<�tK�sJ�rI�kB�mD�f=�]5�]5�X0�hA�Z4�^:�Z7�W4�Y5�b>�`=�`=�[7�Y5�[7�U2|P,�T0�]9�U1�U1�Z5�]8�_:�e?�iC�qJ�d=�f=�kB�g>�_6�`7�kB�_6�`8�b:�jB�hA�f?�kD�qK�c<�e>�g@�d=�]5�_6�c;�\3�h?�c;�c<�X4�Y8}t`�Ӷ�������ƫ
12
+ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������uN0zS4vN/�\<�_@~Y<xU:mJ1jI.bA'aA'lK2lL4hI0cD+aB)dD+^>$mK2sR7uS8xU:rO3sO3rM0sK,�cC�cC�`?�a?�W6}T4sK,}W9�]?�^A�[>}X:}W9sN0pK-�bD~X;}X:Y;tN0oL/a?%�('�76�DD�CC�98�--�""��
13
+ �[?�a?�lE�pG�sJ�zQ�}T�V��[��W�mD��Y�vM�yP�xO�lK (aB*wR5���������������631�qK�vO�{U�rK�mF�iC�iE�a@ �gF�mJ�uQ�vO�rJ�}T�~U��Z�{R�uL�yP��W�zQ�xO��X�~V�zR�{T�sL�jE�tO�nI�sN�pL�e@�oI�qK�rM�iD�pJ�rM�lH�jF�c>�iD�sM�nI�tO�vP�d?�oI�lG�nJ�jF�nI�uO�tM�pI�d<�{S�zQ�xO�~U��^�wN�vM�tK�uL�yP�|S��W��W�zQ�f=��b�xO�xO�yQ�X�gC�Z:`YE�Ǥ�ҫ�ҫ���
14
+ GGG���������������631�kE�uN�tM�tM�|U��[�jF�jF@/"U<(�pM�]9�xR�xP�pH�|S�{R�xO�V��a�vM�{RÏf��a�}U�yQ�d>�}X�kG�_<�gE�hF�hF�jF�vR�kH�iF�yU�vR�tQ�jG�_=�mJ�d@�b?�lH�pL�pL�c?�tP�lJ�c@�qN�~[�xT�oJ�pJ�yR�h@�pG�{R��W��X�xO��]��X�uL��Zѝt��]�yP�|S�~U�i@�nE�yP�{R�xQ�nJ�oM__S�޽�������α��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������б������mL�qP�xT�|W��^��_�|V�~X�jE�~Y�d?�^9�fA�rM�wR�vQ��_��{��l��{��k��]��[�lF��[�iC�hA�jE��l��}��e��a��[�~[��~�����j�~W�oH��_�mG�zT�lE�rK�{U�yR��|��e ��('�+*�'&�! �����{W;�sQ��a��Y��b̘oǓj��_�}TǓj��d��c�{R�uL��W�yP��b��d��Y�fGXXXkkkhhhfffhhh...
15
+ �iF�{W�lG�vO�qI�V�V��b��d��c��_ÏfĐg��`��_�nH�wTH1!
16
+ ����l vR5�Y6�rJ�tL�eB�yR�wP�sK�jA�uL��W�g>�oF�mD�jA�wN�h?�sK�qI�tM�zS�{T�qJ�`;�iD�nI�b<�nG�h@�i@�oG�vP�uP�uQ]A+%�c@�b?�mG�oH�c;�tK�i@�jA�pG�{R��Y��`�zQ�hA�jD�_<$gD) mJ.�]=�bC$ ^@(/  '}T5�Z:oK/
17
+ _C. +�X7�eA�wR�g@�f=�pG�sJ�sJ�h?�qH�xO�|S��Y�wN�{R�nE�xO��Y�mD�i@�mD�mD�sK�c=�jF�eB�a@5- !sP5gE*��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������б������bA�_=�e@�`9�Y0�`7�\3�V-�c:�^5�X/�kB�g>�jA�uL�wN��������������������������������������������������������������������������������������������Ϋ�����������z xS7�fD�`:�hA;'|O+�R,�b:�Z1�_6�W.�jA�h?�vM�~U�zQ�h?�sK�V.�b:�V.�Q*�X2�S.�X3�rK�wP�xQ�mD�uM�W0�V0}O+zM*
18
+ hD'vI%�b=�`9�lD�xO�|S�rI�oF�f=�Z1�a8�Y2O)�V2tJ);$
19
+ S6oH)pF$Q-�a;�c;�lC�zQ�sJ�{R�f=�h?�_6�h?�X/�^5�d;�Z1�]4�^5�f=�jA�yP�vN�tM�_9�d?zN*�V4oF&e?!jE)���������������������������```��������������������������������������������������������������������������������������������������������������������������������������������������б�����tK*~R0}N)�Q)�R)�Q(�N%�P'�X/�\3�]4�a8�^5�_6�U,�^5��������������������������������������������������������������������������������������������Ϋ������������b>"yN,�Y4\:D(rE"�S,�Z2�\3�_6�]4�g>�N%�Y0�\3�_6�Y1�O'~L$L$M%�O(�T.�S-}L&�U.�X1�_6�X/|I"yI"vG#sF"@'.~R/|O+�U0�T,�U-�_6�c:�W.�U,�R*�N&yH"tF"qG&iC%*�����������䎎�&
20
+ b?$nG)vK)�Z5�_8�a:�Y1�Z1�`7�e<�R)�Y0�X/~J!�T+�\3�a8�\3�b9�`7�f=�U,�X0�\4�]6�R,yJ%vH$i>e=e?!���������������������������000��������������������������������������������������������������������������������������������������������������������������������������������������б�����zP0�W5�gB�f>�a8�uL��Y�yP�yP�vM�~U�yP�oF�mD�uL�f=��������������������������������������������������������������������������������������������̫�����������W;$xN.�d@  �^A�lH�vO�zR��W�sJ�g>�mD�oF�b9�sJ�xO�i@�]4��\�V�yQ�xQ�pI�f?�kE�`8�oF�vM�d<�\5�uP�qM�dC
21
+ �gF�hE�_:�g@�pH�e<�i@�sJ�jA�^6�mF�uP�eB�\<uQ5 �����������ѩ�� \?'^?(T5
22
+ ���������������_A)dD,bC*[<$�����������ѩ��
23
+ %#"$""$ e>pA�T-�X0�a8�d;�b9�V-�Z1�`7�Z1�T+�V-�`8a>#�`9�`9�^7�W.�\3�Y0�W.�P(�Q+�W3�T1
24
+ H,yL)�W3�\6�]6�\3�`7�V.�T-tF"oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@a:rH&}O+�W1�a9�]4�[2�\3�^5�^5�R)�]4�c:�^5�W.�N%�Y0�[2�`7�c:�`7�Y0�Z1�Y0�\4~M'yL)yO.���������������������PPP��������������������������������������������������������������������������������������������������������������������������������������������������������б�����zR3xN-�T2�Z7�hD�^;�U3mM4H2"�aA�Y6�\8�Z5�xR�wO�kC���������������������������������������������������������������ƺ�������������������������vW=tP4|U7qK-�cD�^?�Z<~W8kD%~V8�[=cE-
25
+ --,10/+*)"! 
26
+  jC%�fB�sL�zQ�zQ�lC�g>�c:�zQ�xO�mD�zQ��[�xQ�~W�oH�g?�e<�d;�uL�yP�mE�jD�wR�oKiJ2#�Y6�rN�mG�f?�`8�e<�c;�mG�_<�rX�rX�rX�rX�rX�rX�rX�rX�sY�tY�tY�tY�tY�tY�tY�tY�tY�tY�tY�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rXhC&�[:�mJ�kF�pH�oF�mD�\3�tK�tK�h?��\�V�yP�tK�[2�uL�~U�wN�zQ�nE�jA�]4�uL�tK�c=�nK�iH������������������PPP�����������������������������������������������������������������������������������������������������������������������������������������������������������б�����rK-yR3~T4�fD�bAS:&!/ [<$b?$pD!�`;�c=�a9�������������������������ƾ���������������������������������������ƺ��Ǿ���������������ź��z\�e@�gC�dA�lG�pK�iE�a=�W4pD!jG-
27
+ $""654CBBA@@554)('
28
+ U4�]:�b=�pJ�zR�pH�jE�cAoS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@rP5~W9�Z8�kF�hA�tK�yP�{R�}T�~U�|S��W�xO�mD�mD�xO�xO�nE�tK�lC�rI�wN�zQ��X�{R�rL�pM�bA���+++
29
+
30
+
31
+
32
  �cC�fD�pK������������������������ǹ�������������������������������������������ø��������������������|S�~U�~U�{R�V�V��Z�nE�X�^<1"10/=<;;:90/.$""
33
+
34
+ �gF�jD�nE�tK�vM��X�|S�tK��Y�yR�rK�wP�wP�pH�rI�tK�xO�~U�|S�qH�}V�wQ�mI�nK4#M7%�kH�iE�kF�pI�xQ�qL�dC�tY�tY�tY�tY�tY�tY�tY�tY�tY�tY�tY�uZ�v[�v[�v[�v[�v[�v[�v[�v[�tY�tY�tY�sX�tY�tY�uZ�v[�v[�x\�x\�x\�w[tQ6zT6�eC�mI��Y�yP�oF�{R�}T�~U�|S�~U��W��Y�oF��]�sJ�yP�}T��Z�vM�oF�vM�zQ�~U�sM�gD�jI���WWW@@@)))������������������������������������������������������������������������������������������������������������������������������������������������������������������������[@+
35
+
36
+
37
+ ###### [?)�a@�jG������������������������Ȼ�������������������������������������������÷��ȿ�����������������_őh�VŽe͙p�uL��]�lC�pH�rM�eC 0/.0/.('&V:$�dC��^�}T��^őh��]��]˗n��\�xQ�gA�iC�uN��Y��Z��^��`��^��_��d��^�qJ�hC�nJ�Z; �iF�lI��\�|V��Z�zU�rPoS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@mK0�^?�cB�iE�uMőh�yP��^őh�VÏf͙p�vM��\�mD�tK�}T�~U�qH�{RȔk�}T��^Ïf��X�Y��a�fE������������vvv^^^��������������������������������������������������������������������������������������������������������������������������������������������������������������а�����  ###############$�eF�mL������������������������Ⱥ�������������������������������������������ø���������������������[��^��_��`��\�pG��d�vM�V�lD�_;�bA0#
38
+
39
+  N5 Y;�oL�{U��^��d��Z��ZŽeÏf�wN�uN�}V�nG�{U��]��[��_��[��YƒiŽe�}T�pI�}W�[6�iE$cG1�wS�zU�|V�|W�qM�vU�uZ�v[�tY�tY�sY�rX�rX�rX�rX�sY�v[�v[�v[�uZ�tY�tY�uZ�tY�rX�sY�sX�rX�rX�rX�sY�uZ�uZ�tY�tY�tY�tY�tY�uZuS8vP2�X7�oK��Z��^��^��[��^��^��`��]�pG��b�wN��X�qH�kB�{R��]��Z��a��d��^��Y��Z�xU�^=������������������@@@�����������������������������������������������������������������������������������������������������������������������������������������������������������а�����!!!###"""###############bB(W6����ɾ������������������Ȼ�������������������������������������������ø��������������������lC�i@�f=�e<�Z1�_6�[2�[2�\3�`7�g@�a<U47$  V8 pK-�Y7�d?�iA�_6�sJ�g>�jA�kB�a8�V.�[4�Y3�iC�jD�nF�c:�qH�b9�oF�jA�h?�U,�W/�Y3�S.�T1\<$#�dA�W3�d>�d>�]:~S2oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@a>#mG)�X7�]8�b;�kB�f=�kB�h?�e<�e<�Z1�_6�\3�[2�\3�a8�kB�lC�jA�i@�a8�oF�d;�b:�`9{O+rH'���������������������PPP��������������������������������������������������������������������������������������������������������������������������������������������������������а�����### 
40
+ W9!iB$�T1�_8�mE�tK�sJ�\3�kB�S*�\3�Z1�]4�c;�`9�_8�pI�mF�qI�]4�i@�S*�V-�Y0�a8�]4�c:�c;�U.�[6�S.S9$9'�X3�[5�Y2xK&wM+oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@oS@`>"pJ,U4�c>�b:�sJ�c:�c:�[2�a8�Y0�d;�jA�kB�`7�[2�c:�jA�qH�nE�rI�^5�i@�V-�]5�T.}P-�V5������������������������000���������������������������������������������������������������������������������������������������������������������������������������������������������]?'### !!!##################
1
- ���μ�����������������˿������õ��¸�������������������f=�vM�wN�c:�lC�g>�\3�b9�i@�sJ�V�tK�tK�nG�lF�Y7K3!V8!nG)�V3�f?�~U�kB�zQ�kB�uL�pG�uL�nE�kB�h?�]5�`9�\5�e>�tM�f>�tK�qH�pG�lC�nE�h?�^5�g>�`8�c<�\6�lF�^: 9&�kE�gA�c>�`<�X6�v[�tY�tY�uZ�v[�v[�v[�v[�v[�v[�v[�v[�uZ�v[�v[�v[�v[�w\�x\�x\�v[�v[�v[�x\�x\�v[�v[�v[�v[�v[�x\�x\�z^hE*X:�eC�jF�lE�uL�uL�f=�vM�wN�c:�kB�f=�]4�b9�h?�rI�V�sJ�vM�pG�uL�lC�qH�pG�^7�Y6vM,���������������������������@@@��������������������������������������������������������������������������������������������������������������������������������������������������б�����dB)0 
41
+
42
+
43
+ ######
44
+ lc^������ij�Ķ����������������������������������õ�̽��ù�������������������ʽ��z�pG�zQ��\��c��[�wN�|S�|S��[�vM�zQ�nE�yP�f=�mF�hC~V7 !�`B�dC�oJ�zR��W�sJ�V�jA�zQ�jA�e<�sJ�mD�V��]��`�zSzU7�sL�c<�uM�mD�\3�rI�pG�sJ��ZŽe��^�vM�vM�|T�lD�mF�f?�qJ�lE�Y1�nG�f@�^;�x\�x\�v[�v[�tY�tY�tY�rX�rX�sX�sX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�rX�tY�tY�tY�tY�tY�v[�v[�v[�w[�v[�v[}X;�fE�c@�jE�pH�{R�g>�uL�qH�yP��\��c��[�xO�|S�|S��[�uL�yP�kB�sL�a:�hB�iC�c>�pM�jJ�cE���������������������������PPP��������������������������������������������������������������������������������������������������������������������������������������������������С�����uR5iG,( """""" 2~@@% PJF������ȹ�ʺ�ĵ�������������������ö�ʼ�Ͼ��Ż����������������������ɼ��x��Z�yP�~U��W�tK�wN��_�~U�}T�wN�pG�~U�pG�c:�qH�|T�sN�jG�fE�`=�d?��Y�V�yP�zQ�i@�zQ�nE�kB�sJ�V��X��\��Y�tK�jB�hB�pI�lD�pG�pG�yP�~U��]��_�}T�qH��W��^�wO�}U�iA�uM�uM�h@�kD�tM�sM�vR�`A�gF�eA�mG�}U�sJ�d;�pG��Z�zQ�~U�V�sJ�vM��_�~U�|S�wN�nE�zR�jC�\6�fA�oL�kH�eD�]>uP3���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������qqqa]YX2Y5N."""2/��x��[��B��W�ZZ�VV�00�776���ξ��ź�ĺ����ù�ø�ù�ø�¶�ø�ȼ�ʾ�������������������������ɼ��g�R)�P'{G�L#�L#�N%vBxDK"xD}I �N%K"�P'�L#|H~L%xH"uEwG!�P)s@uA�N%xDyE�M$�M$�M$�L#�N%�L#�O&�L#}I!\:{J#yH"|I!~J!�N%zF~J!~J!�S*�L#�W.xDs?|HxD�P'{HzGL#�N%s?vEm>oC b9X3J*���������������?%=#?%���������������:">$:!
45
+ 6$U:%��flg775!��h��Z��=ic0 q22�DD8s_M�}g��y������������������������������~��y��z����������������������i��`��X�}T��Z�}T�pG�rI�~U�pG�V�V�{R��W��`��Y��_��Z�~U��]��W�qH�qH�wN�g>��X�zQ��X��]��[��[��\��Y��Y��_��X�mF�g@�tM�yS�yS�|U��]�|T�}V��X��Z�X�rJ�e>�nG�d<�vN�xP�{S�zR��Y��_��X��W��X�yP�zT�jF�V5]@(nI-1!lL4B/bF/]B-dI2�`C�_@ �aC�bC�bA�`>�hB�yR�uL�~U��[�zQ�~U��c��Z��`��X�}T��[�~U�pG�rI�}T�nE�V�|S�tM�oL�lKFA.��i��x��xckN������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������~W8}V7�X8V5}U5pO5 1 KZ#
46
+
2
47
  E D0
48
+ fb=OJ(><"! 
49
+ FB(<:852/+(E0zU7�rL�{T�xQ��]�zS��d��Y��Z�W��^�~V��\��Y�sK�pH�yQ�W�xP��c�zR��c�W��\��Z��^��Y��\��X�uM�oF�yP�|T�zQ��c�xOőh�|S��_��Z��d��]��_��`�|S�tK�rI�zQ�~U��b�xOőh�vM��^��^��a�X��Z��]�lF�oJ�yT�oI�|V�qK�Y�|V�Y�{V�tO�|W�gB�vQ�^9�pJ�zT�{U�xQ�{T��\��]��^��^đh�wN��Z�sL�sNH2 D1"�pN�pM�xV�hF�lK�gG�]=�\<�hF�lI�jG�uR�lI�xV�lK�iI�fF�lL�jH�sP�tP�mG�mE�yP��W�{R��d�}T��d��X��^��\��`��[��^��Z�xO�qH�{R�}T�{R��b�qK�[�aA8=-��p��x��x�d��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Я������bE�eFmO7=P B`6���Ų���%H%& !&
50
+
51
+
52
+ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ϯ�����zV9Y;#
53
+ ) *M�����tNr"=kv�Db~<~�YVy8Ut'_Of@
54
+ GGG���������������2/,zL)�V3�X5�Y6zO+hD(2\:4"!0
55
+ uN1gE* I4xL)�V3�Y5�_;�W2�\6�[4�T,�`7�jA�e<�g?�e=�`9�U.�`9�\5�]6�`9�Z3�d=�e=�W/�]5�jA�kB�c;�f>�b:�U,�lC�^5�a8�_6�]4�lC�a9�^6�\4�g>�nE�f=�lC�d;�Y0�pG�a8�f=�^5�f=�c:�e<�^5�]4�e<�lC�kB�sJ�f=�^5�i@�d;�h@�^7�X4sI(VQ9��i��x��x{�^ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� .<Q ]^s�WPt/_�Of�T:of�.g�8T�a�8t�M��qTs0���E];( 
56
+ *S8$�iE�vM�vO�sO�kH8=-��i��x��x|�^
57
+ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2!
58
+ 4D
59
+ fzU'Ty�mBwd�-E{n�RN0N�JpRR%Bkk�Jcx=;  M3���������������������������������������������������������������???������������������������������vO/~R.�^:qN31!(gF,��Z�vM�uL�xO�wN�{R�c:gF,
60
+ 1J&  �Z6�Z5�oI�iC�_8�^5�xP�{S�mF�nG�vO�mF�f>�g?�h@�e=�X1�sL�mF�g?�c;�jB�|T�sL�oH�nG�sL�jB�nG�iA�c;�Y2�pI�tM�qJ�a9�a9��Y�uN�pI�jB�uN�oH�lE�jB�c<�`8�nF�yP�kC�f=�kB��_�uL�rI�iElL2&2"qK-�V1�^; ��}CI5
61
+ ]@)653�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������~zw "@������En3��}2iFSyA�����A|f�.��tLs)w�YNk')
62
+  I3#���������������������������������������������������������������OOO����������������������������������]?�X7�b>�lE�}T��X�~U�lH6%�bA��Z�|S�kG,�iB�V�jA�nF�pI�uN���������������41/�mJ�eB�dB~T3]A+Fk9;X2
63
+ c�WOuF
64
+ %7#MrD *wM+~R/�Z7�^:|O,�`=�^:�d>�^7�[3�jA�d;�a8�^5�d;�X/�]4�f>�c;vQ47%�\7�W3}R0xP1rL.*'&������������������������������������������������������������������������������������������������������������������������������������������������������������������������������nnn
65
+
66
+ ;X2,B(^�J sK+�cB�c@�hE�_<�\9����������������������������������������������������������������������������������������������������������������������dC�dA�tO�]6�b:�g>�sJ�i@�S*�e<�c:�xO�xO�vM�wOcD+I3"�X3�\8{Q0yQ1,*(������������������������������������������������������������������������������������������������������������������������������������������������������������������������������^^^E?9mK0nL2 Ev�nNm<Fn h�Q��[v�?.c~�e\H5cWw7��_~�R!: V;&T7 ���������������������������������444������������������������������zzz{{{���������������������������������uP3�Y8�gD�gA�wN�e<�h?�rI�sJ�xObE-%qI*�f=�nE�qH�qH�qJ�mF�pI���������������30.~P-�V3L3 fG-N7$'!0#"Bc7-)@%r�Xd�LW9#�];�c@�eB�dB�bA����������������������������������������������������������������������������������������������������������������������]=�]<�hD�]7�jB�sJ�xO�{R�nE�[2�lC�qH�qH�pG�wN�mD5%nI+�^8�_<�Y9-+)������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cccH?8eC(hH-- =����Ү��}X~'q�Ee�Tg�32]Nr%��ut�T<R(@ &(bC+���SSS������rL.}S2�eA�tM�uM�nE�mD�oF�kB�nE�nE �U1�V-�i@�lC�e=�oH�sL�rK���������������30-wJ'�U2�[:}R2
67
+
68
+ 
69
+ @=:EB>1.+-*(IDBLGDNIFPLHRMIROJSOKTOKSNIOKHMIEKFCIFBIEAIEAIEAIEAIDBIDBIEAHDAHEAJFBIEAIDAHDAHCAHDAIDBIEBJFBIEBJFBJFBJFCIEBJFBJFCJFBJFBIFBLGDNJFRMITOKga\f`\c^Ye_[d^Yiiiiiigggfffffffff_ZV^XT_YU]XTZUQVRM
@@ -12,6 +12,16 @@ module ResourceFileHelper
12
12
  end
13
13
 
14
14
 
15
+ module MatrixDisplayingHelper
16
+ def display(matrix)
17
+ image = ChunkyPNG::Image.from_pixel_matrix(matrix)
18
+ filename = resource_file('_tmp.png')
19
+ image.save(filename)
20
+ `open #{filename}`
21
+ end
22
+ end
23
+
15
24
  Spec::Runner.configure do |config|
16
25
  config.include ResourceFileHelper
26
+ config.include MatrixDisplayingHelper
17
27
  end
@@ -2,6 +2,17 @@ require File.expand_path('../spec_helper.rb', File.dirname(__FILE__))
2
2
 
3
3
  describe ChunkyPNG::PixelMatrix do
4
4
 
5
+ describe '.from_rgb_stream' do
6
+ it "should load an image correctly from a datastrean" do
7
+ reference = ChunkyPNG.load(resource_file('pixelstream_reference.png')).pixel_matrix
8
+
9
+ File.open(resource_file('pixelstream.rgb')) do |stream|
10
+ pm = ChunkyPNG::PixelMatrix.from_rgb_stream(240, 180, stream)
11
+ pm.should == reference
12
+ end
13
+ end
14
+ end
15
+
5
16
  describe '.decode' do
6
17
 
7
18
  [:indexed, :grayscale, :grayscale_alpha, :truecolor, :truecolor_alpha].each do |color_mode|
@@ -15,7 +26,7 @@ describe ChunkyPNG::PixelMatrix do
15
26
  it "should decode a transparent image correctly" do
16
27
  reference = ChunkyPNG::PixelMatrix.new(10, 10, ChunkyPNG::Pixel.rgba(100, 100, 100, 128))
17
28
  ds = ChunkyPNG.load(resource_file("transparent_gray_10x10.png"))
18
- ds.pixel_matrix.should == reference
29
+ ds.pixel_matrix.should == reference
19
30
  end
20
31
 
21
32
  it "should decode an interlaced image correctly" do
@@ -41,6 +52,42 @@ describe ChunkyPNG::PixelMatrix do
41
52
  File.unlink(filename)
42
53
  end
43
54
  end
55
+ end
56
+
57
+ describe '#crop' do
58
+ before(:each) do
59
+ @matrix = ChunkyPNG.load(resource_file('operations.png')).pixel_matrix
60
+ end
61
+
62
+ it "should crop the right pixels from the original matrix" do
63
+ cropped = @matrix.crop(10, 5, 2, 3)
64
+ cropped.size.should == [2, 3]
65
+ cropped[0, 0].r.should == 10 * 16
66
+ cropped[0, 0].g.should == 5 * 16
67
+ end
68
+ end
69
+
70
+ describe '#compose' do
71
+ before(:each) do
72
+ @matrix = ChunkyPNG.load(resource_file('operations.png')).pixel_matrix
73
+ end
44
74
 
75
+ it "should compose pixels correctly" do
76
+ submatrix = ChunkyPNG::PixelMatrix.new(4, 8, ChunkyPNG::Pixel.rgba(0, 0, 0, 75))
77
+ @matrix.compose(submatrix, 8, 4)
78
+ # display(@matrix)
79
+ end
80
+ end
81
+
82
+ describe '#replace' do
83
+ before(:each) do
84
+ @matrix = ChunkyPNG.load(resource_file('operations.png')).pixel_matrix
85
+ end
86
+
87
+ it "should replace the correct pixels" do
88
+ submatrix = ChunkyPNG::PixelMatrix.new(3, 2, ChunkyPNG::Pixel.rgb(255, 255, 0))
89
+ @matrix.replace(submatrix, 5, 4)
90
+ # display(@matrix)
91
+ end
45
92
  end
46
93
  end
@@ -28,5 +28,20 @@ describe ChunkyPNG::Pixel do
28
28
  @opaque.to_truecolor_bytes.should == [10, 100, 150]
29
29
  @non_opaque.to_truecolor_alpha_bytes.should == [10, 100, 150, 100]
30
30
  end
31
+
32
+ describe '#compose' do
33
+ it "should use the foregorund pixel as is when an opaque pixel is given" do
34
+ (@white & @opaque).should == @opaque
35
+ end
36
+
37
+ it "should use the background pixel as is when a fully_transparent pixel is given" do
38
+ (@white & @fully_transparent).should == @white
39
+ end
40
+
41
+ it "should compose pixels correctly" do
42
+ (@white.compose_quick(@non_opaque)).should == ChunkyPNG::Pixel.new(0x9fc2d6ff)
43
+ (@white.compose_precise(@non_opaque)).should == ChunkyPNG::Pixel.new(0x9fc2d6ff)
44
+ end
45
+ end
31
46
  end
32
47
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chunky_png
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
@@ -33,6 +33,7 @@ extra_rdoc_files:
33
33
  - README.rdoc
34
34
  files:
35
35
  - spec/spec_helper.rb
36
+ - spec/resources/pixelstream.rgb
36
37
  - spec/resources/gray_10x10_grayscale.png
37
38
  - spec/resources/gray_10x10.png
38
39
  - .gitignore
@@ -43,18 +44,21 @@ files:
43
44
  - lib/chunky_png/pixel_matrix/decoding.rb
44
45
  - lib/chunky_png/chunk.rb
45
46
  - spec/unit/encoding_spec.rb
47
+ - spec/resources/operations.png
46
48
  - Rakefile
47
49
  - spec/resources/transparent_gray_10x10.png
48
50
  - README.rdoc
49
51
  - spec/resources/gray_10x10_indexed.png
50
52
  - spec/resources/16x16_non_interlaced.png
51
53
  - spec/integration/image_spec.rb
54
+ - lib/chunky_png/pixel_matrix/operations.rb
52
55
  - lib/chunky_png/pixel.rb
53
56
  - lib/chunky_png/palette.rb
54
57
  - lib/chunky_png/datastream.rb
55
58
  - chunky_png.gemspec
56
59
  - tasks/github-gem.rake
57
60
  - spec/unit/decoding_spec.rb
61
+ - spec/resources/pixelstream_reference.png
58
62
  - spec/resources/gray_10x10_grayscale_alpha.png
59
63
  - spec/resources/16x16_interlaced.png
60
64
  - spec/resources/adam7.png