chunky_png 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/benchmarks/decoding_benchmark.rb +8 -4
- data/benchmarks/encoding_benchmark.rb +3 -1
- data/benchmarks/filesize_benchmark.rb +30 -0
- data/chunky_png.gemspec +4 -4
- data/lib/chunky_png.rb +11 -1
- data/lib/chunky_png/canvas.rb +19 -2
- data/lib/chunky_png/canvas/drawing.rb +2 -2
- data/lib/chunky_png/canvas/operations.rb +1 -1
- data/lib/chunky_png/canvas/png_decoding.rb +85 -94
- data/lib/chunky_png/canvas/png_encoding.rb +120 -132
- data/lib/chunky_png/canvas/stream_importing.rb +2 -2
- data/spec/chunky_png/canvas/png_decoding_spec.rb +27 -29
- data/spec/chunky_png/canvas/png_encoding_spec.rb +103 -22
- data/spec/resources/pixelstream_best_compression.png +0 -0
- data/spec/resources/pixelstream_fast_rgba.png +0 -0
- data/tasks/github-gem.rake +24 -36
- metadata +87 -73
@@ -38,54 +38,135 @@ describe ChunkyPNG::Canvas::PNGEncoding do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
-
it "should save an image using the :
|
41
|
+
it "should save an image using the :fast_rgba routine correctly" do
|
42
42
|
canvas = reference_canvas('operations')
|
43
|
-
canvas.should_not_receive(:
|
43
|
+
canvas.should_not_receive(:encode_png_str_scanline_none)
|
44
|
+
canvas.should_not_receive(:encode_png_str_scanline_sub)
|
45
|
+
canvas.should_not_receive(:encode_png_str_scanline_up)
|
46
|
+
canvas.should_not_receive(:encode_png_str_scanline_average)
|
47
|
+
canvas.should_not_receive(:encode_png_str_scanline_paeth)
|
44
48
|
Zlib::Deflate.should_receive(:deflate).with(anything, Zlib::BEST_SPEED).and_return('')
|
45
49
|
canvas.to_blob(:fast_rgba)
|
46
50
|
end
|
47
51
|
|
52
|
+
it "should save an image using the :good_compression routine correctly" do
|
53
|
+
canvas = reference_canvas('operations')
|
54
|
+
canvas.should_not_receive(:encode_png_str_scanline_none)
|
55
|
+
canvas.should_not_receive(:encode_png_str_scanline_sub)
|
56
|
+
canvas.should_not_receive(:encode_png_str_scanline_up)
|
57
|
+
canvas.should_not_receive(:encode_png_str_scanline_average)
|
58
|
+
canvas.should_not_receive(:encode_png_str_scanline_paeth)
|
59
|
+
Zlib::Deflate.should_receive(:deflate).with(anything, Zlib::BEST_COMPRESSION).and_return('')
|
60
|
+
canvas.to_blob(:good_compression)
|
61
|
+
end
|
62
|
+
|
48
63
|
it "should save an image using the :best_compression routine correctly" do
|
49
64
|
canvas = reference_canvas('operations')
|
50
|
-
canvas.should_receive(:
|
65
|
+
canvas.should_receive(:encode_png_str_scanline_paeth).exactly(canvas.height).times
|
51
66
|
Zlib::Deflate.should_receive(:deflate).with(anything, Zlib::BEST_COMPRESSION).and_return('')
|
52
67
|
canvas.to_blob(:best_compression)
|
53
68
|
end
|
54
69
|
end
|
55
70
|
|
56
|
-
describe '#
|
71
|
+
describe '#encode_png_image_pass_to_stream' do
|
72
|
+
before { @canvas = ChunkyPNG::Canvas.new(2, 2, ChunkyPNG::Color.rgba(1, 2, 3, 4)) }
|
73
|
+
|
74
|
+
it "should encode using RGBA / no filtering mode correctly" do
|
75
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_TRUECOLOR_ALPHA, ChunkyPNG::FILTER_NONE)
|
76
|
+
stream.should == "\0\1\2\3\4\1\2\3\4\0\1\2\3\4\1\2\3\4"
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should encode using RGBA / SUB filtering mode correctly" do
|
80
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_TRUECOLOR_ALPHA, ChunkyPNG::FILTER_SUB)
|
81
|
+
stream.should == "\1\1\2\3\4\0\0\0\0\1\1\2\3\4\0\0\0\0"
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should encode using RGBA / UP filtering mode correctly" do
|
85
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_TRUECOLOR_ALPHA, ChunkyPNG::FILTER_UP)
|
86
|
+
stream.should == "\2\1\2\3\4\1\2\3\4\2\0\0\0\0\0\0\0\0"
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should encode using RGBA / AVERAGE filtering mode correctly" do
|
90
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_TRUECOLOR_ALPHA, ChunkyPNG::FILTER_AVERAGE)
|
91
|
+
stream.should == "\3\1\2\3\4\1\1\2\2\3\1\1\2\2\0\0\0\0"
|
92
|
+
end
|
93
|
+
|
94
|
+
it "should encode using RGB / no filtering mode correctly" do
|
95
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_TRUECOLOR, ChunkyPNG::FILTER_NONE)
|
96
|
+
stream.should == "\0\1\2\3\1\2\3\0\1\2\3\1\2\3"
|
97
|
+
end
|
98
|
+
|
99
|
+
it "should encode using indexed / no filtering mode correctly" do
|
100
|
+
@canvas.stub(:encoding_palette).and_return(mock('Palette', :index => 1))
|
101
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_INDEXED, ChunkyPNG::FILTER_NONE)
|
102
|
+
stream.should == "\0\1\1\0\1\1"
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should encode using indexed / PAETH filtering mode correctly" do
|
106
|
+
@canvas.stub(:encoding_palette).and_return(mock('Palette', :index => 1))
|
107
|
+
@canvas.encode_png_image_pass_to_stream(stream = "", ChunkyPNG::COLOR_INDEXED, ChunkyPNG::FILTER_PAETH)
|
108
|
+
stream.should == "\4\1\0\4\0\0"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe '#encode_png_str_scanline' do
|
57
113
|
|
58
114
|
it "should encode a scanline without filtering correctly" do
|
59
|
-
|
60
|
-
|
61
|
-
|
115
|
+
stream = [ChunkyPNG::FILTER_NONE, 0, 0, 0, 1, 1, 1, 2, 2, 2].pack('C*')
|
116
|
+
encode_png_str_scanline_none(stream, 0, nil, 9, 3)
|
117
|
+
stream.unpack('C*').should == [ChunkyPNG::FILTER_NONE, 0, 0, 0, 1, 1, 1, 2, 2, 2]
|
62
118
|
end
|
63
119
|
|
64
120
|
it "should encode a scanline with sub filtering correctly" do
|
65
|
-
|
66
|
-
|
67
|
-
|
121
|
+
stream = [ChunkyPNG::FILTER_NONE, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
122
|
+
ChunkyPNG::FILTER_NONE, 255, 255, 255, 255, 255, 255, 255, 255, 255].pack('C*')
|
123
|
+
|
124
|
+
# Check line with previous line
|
125
|
+
encode_png_str_scanline_sub(stream, 10, 0, 9, 3)
|
126
|
+
stream.unpack('@10C10').should == [ChunkyPNG::FILTER_SUB, 255, 255, 255, 0, 0, 0, 0, 0, 0]
|
127
|
+
|
128
|
+
# Check line without previous line
|
129
|
+
encode_png_str_scanline_sub(stream, 0, nil, 9, 3)
|
130
|
+
stream.unpack('@0C10').should == [ChunkyPNG::FILTER_SUB, 255, 255, 255, 0, 0, 0, 0, 0, 0]
|
68
131
|
end
|
69
132
|
|
70
133
|
it "should encode a scanline with up filtering correctly" do
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
134
|
+
stream = [ChunkyPNG::FILTER_NONE, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
135
|
+
ChunkyPNG::FILTER_NONE, 255, 255, 255, 255, 255, 255, 255, 255, 255].pack('C*')
|
136
|
+
|
137
|
+
# Check line with previous line
|
138
|
+
encode_png_str_scanline_up(stream, 10, 0, 9, 3)
|
139
|
+
stream.unpack('@10C10').should == [ChunkyPNG::FILTER_UP, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
140
|
+
|
141
|
+
# Check line without previous line
|
142
|
+
encode_png_str_scanline_up(stream, 0, nil, 9, 3)
|
143
|
+
stream.unpack('@0C10').should == [ChunkyPNG::FILTER_UP, 255, 255, 255, 255, 255, 255, 255, 255, 255]
|
75
144
|
end
|
76
145
|
|
77
146
|
it "should encode a scanline with average filtering correctly" do
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
147
|
+
stream = [ChunkyPNG::FILTER_NONE, 10, 20, 30, 40, 50, 60, 70, 80, 80, 100, 110, 120,
|
148
|
+
ChunkyPNG::FILTER_NONE, 5, 10, 25, 45, 45, 55, 80, 125, 105, 150, 114, 165].pack('C*')
|
149
|
+
|
150
|
+
# Check line with previous line
|
151
|
+
encode_png_str_scanline_average(stream, 13, 0, 12, 3)
|
152
|
+
stream.unpack('@13C13').should == [ChunkyPNG::FILTER_AVERAGE, 0, 0, 10, 23, 15, 13, 23, 63, 38, 60, 253, 53]
|
153
|
+
|
154
|
+
# Check line without previous line
|
155
|
+
encode_png_str_scanline_average(stream, 0, nil, 12, 3)
|
156
|
+
stream.unpack('@0C13').should == [ChunkyPNG::FILTER_AVERAGE, 10, 20, 30, 35, 40, 45, 50, 55, 50, 65, 70, 80]
|
82
157
|
end
|
83
158
|
|
84
159
|
it "should encode a scanline with paeth filtering correctly" do
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
160
|
+
stream = [ChunkyPNG::FILTER_NONE, 10, 20, 30, 40, 50, 60, 70, 80, 80, 100, 110, 120,
|
161
|
+
ChunkyPNG::FILTER_NONE, 10, 20, 40, 60, 60, 60, 70, 120, 90, 120, 54, 120].pack('C*')
|
162
|
+
|
163
|
+
# Check line with previous line
|
164
|
+
encode_png_str_scanline_paeth(stream, 13, 0, 12, 3)
|
165
|
+
stream.unpack('@13C13').should == [ChunkyPNG::FILTER_PAETH, 0, 0, 10, 20, 10, 0, 0, 40, 10, 20, 190, 0]
|
166
|
+
|
167
|
+
# Check line without previous line
|
168
|
+
encode_png_str_scanline_paeth(stream, 0, nil, 12, 3)
|
169
|
+
stream.unpack('@0C13').should == [ChunkyPNG::FILTER_PAETH, 10, 20, 30, 30, 30, 30, 30, 30, 20, 30, 30, 40]
|
89
170
|
end
|
90
171
|
end
|
91
172
|
end
|
Binary file
|
Binary file
|
data/tasks/github-gem.rake
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/tasklib'
|
4
4
|
require 'date'
|
5
|
-
require '
|
5
|
+
require 'set'
|
6
6
|
|
7
7
|
module GithubGem
|
8
8
|
|
@@ -24,7 +24,7 @@ module GithubGem
|
|
24
24
|
|
25
25
|
class RakeTasks
|
26
26
|
|
27
|
-
attr_reader :gemspec, :modified_files
|
27
|
+
attr_reader :gemspec, :modified_files
|
28
28
|
attr_accessor :gemspec_file, :task_namespace, :main_include, :root_dir, :spec_pattern, :test_pattern, :remote, :remote_branch, :local_branch
|
29
29
|
|
30
30
|
# Initializes the settings, yields itself for configuration
|
@@ -33,7 +33,7 @@ module GithubGem
|
|
33
33
|
@gemspec_file = GithubGem.detect_gemspec_file
|
34
34
|
@task_namespace = task_namespace
|
35
35
|
@main_include = GithubGem.detect_main_include
|
36
|
-
@modified_files =
|
36
|
+
@modified_files = Set.new
|
37
37
|
@root_dir = Dir.pwd
|
38
38
|
@test_pattern = 'test/**/*_test.rb'
|
39
39
|
@spec_pattern = 'spec/**/*_spec.rb'
|
@@ -43,13 +43,16 @@ module GithubGem
|
|
43
43
|
|
44
44
|
yield(self) if block_given?
|
45
45
|
|
46
|
-
@git = Git.open(@root_dir)
|
47
46
|
load_gemspec!
|
48
47
|
define_tasks!
|
49
48
|
end
|
50
49
|
|
51
50
|
protected
|
52
51
|
|
52
|
+
def git
|
53
|
+
@git ||= ENV['GIT'] || 'git'
|
54
|
+
end
|
55
|
+
|
53
56
|
# Define Unit test tasks
|
54
57
|
def define_test_tasks!
|
55
58
|
require 'rake/testtask'
|
@@ -165,7 +168,7 @@ module GithubGem
|
|
165
168
|
# in the repository and the spec/test file pattern.
|
166
169
|
def manifest_task
|
167
170
|
# Load all the gem's files using "git ls-files"
|
168
|
-
repository_files = git
|
171
|
+
repository_files = `#{git} ls-files`.split("\n")
|
169
172
|
test_files = Dir[test_pattern] + Dir[spec_pattern]
|
170
173
|
|
171
174
|
update_gemspec(:files, repository_files)
|
@@ -180,7 +183,7 @@ module GithubGem
|
|
180
183
|
end
|
181
184
|
|
182
185
|
def newest_version
|
183
|
-
git.
|
186
|
+
`#{git} tag`.split("\n").map { |tag| tag.split('-').last }.compact.map { |v| Gem::Version.new(v) }.max || Gem::Version.new('0.0.0')
|
184
187
|
end
|
185
188
|
|
186
189
|
def next_version(increment = nil)
|
@@ -223,58 +226,45 @@ module GithubGem
|
|
223
226
|
|
224
227
|
# Checks whether the current branch is not diverged from the remote branch
|
225
228
|
def check_not_diverged_task
|
226
|
-
raise "The current branch is diverged from the remote branch!" if git
|
229
|
+
raise "The current branch is diverged from the remote branch!" if `#{git} rev-list HEAD..#{remote}/#{remote_branch}`.split("\n").any?
|
227
230
|
end
|
228
231
|
|
229
232
|
# Checks whether the repository status ic clean
|
230
233
|
def check_clean_status_task
|
231
|
-
raise "The current working copy contains modifications" if git.
|
234
|
+
raise "The current working copy contains modifications" if `#{git} ls-files -m`.split("\n").any?
|
232
235
|
end
|
233
236
|
|
234
237
|
# Checks whether the current branch is correct
|
235
238
|
def check_current_branch_task
|
236
|
-
raise "Currently not on #{local_branch} branch!" unless git
|
239
|
+
raise "Currently not on #{local_branch} branch!" unless `#{git} branch`.split("\n").detect { |b| /^\* / =~ b } == "* #{local_branch}"
|
237
240
|
end
|
238
241
|
|
239
242
|
# Fetches the latest updates from Github
|
240
243
|
def fetch_origin_task
|
241
|
-
git
|
244
|
+
sh git, 'fetch', remote
|
242
245
|
end
|
243
246
|
|
244
247
|
# Commits every file that has been changed by the release task.
|
245
248
|
def commit_modified_files_task
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
+
really_modified = `#{git} ls-files -m #{modified_files.entries.join(' ')}`.split("\n")
|
250
|
+
if really_modified.any?
|
251
|
+
really_modified.each { |file| sh git, 'add', file }
|
252
|
+
sh git, 'commit', '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
|
249
253
|
end
|
250
254
|
end
|
251
255
|
|
252
256
|
# Adds a tag for the released version
|
253
257
|
def tag_version_task
|
254
|
-
git
|
258
|
+
sh git, 'tag', '-a', "#{gemspec.name}-#{gemspec.version}", '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
|
255
259
|
end
|
256
260
|
|
257
261
|
# Pushes the changes and tag to github
|
258
262
|
def github_release_task
|
259
|
-
git
|
263
|
+
sh git, 'push', '--tags', remote, remote_branch
|
260
264
|
end
|
261
265
|
|
262
|
-
# # Checks whether Rubyforge is configured properly
|
263
|
-
# def check_rubyforge_task
|
264
|
-
# # Login no longer necessary when using rubyforge 2.0.0 gem
|
265
|
-
# # raise "Could not login on rubyforge!" unless `rubyforge login 2>&1`.strip.empty?
|
266
|
-
# output = `rubyforge names`.split("\n")
|
267
|
-
# raise "Rubyforge group not found!" unless output.any? { |line| %r[^groups\s*\:.*\b#{Regexp.quote(gemspec.rubyforge_project)}\b.*] =~ line }
|
268
|
-
# raise "Rubyforge package not found!" unless output.any? { |line| %r[^packages\s*\:.*\b#{Regexp.quote(gemspec.name)}\b.*] =~ line }
|
269
|
-
# end
|
270
|
-
|
271
|
-
# # Task to release the .gem file toRubyforge.
|
272
|
-
# def rubyforge_release_task
|
273
|
-
# sh 'rubyforge', 'add_release', gemspec.rubyforge_project, gemspec.name, gemspec.version.to_s, "pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
274
|
-
# end
|
275
|
-
|
276
266
|
def gemcutter_release_task
|
277
|
-
sh "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
267
|
+
sh "gem", 'push', "pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
278
268
|
end
|
279
269
|
|
280
270
|
# Gem release task.
|
@@ -357,15 +347,13 @@ module GithubGem
|
|
357
347
|
open(__FILE__, "w") { |file| file.write(response.body) }
|
358
348
|
end
|
359
349
|
|
360
|
-
relative_file = File.expand_path(__FILE__).sub(%r[^#{
|
361
|
-
if git
|
362
|
-
git
|
363
|
-
git
|
364
|
-
puts "Updated to latest version of gem release management tasks."
|
350
|
+
relative_file = File.expand_path(__FILE__).sub(%r[^#{@root_dir}/], '')
|
351
|
+
if `#{git} ls-files -m #{relative_file}`.split("\n").any?
|
352
|
+
sh git, 'add', relative_file
|
353
|
+
sh git, 'commit', '-m', "Updated to latest gem release management tasks."
|
365
354
|
else
|
366
355
|
puts "Release managament tasks already are at the latest version."
|
367
356
|
end
|
368
357
|
end
|
369
|
-
|
370
358
|
end
|
371
359
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chunky_png
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 55
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 10
|
9
|
+
- 0
|
10
|
+
version: 0.10.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Willem van Bergen
|
@@ -14,46 +15,52 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-10-04 00:00:00 +02:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
prerelease: false
|
22
|
-
type: :development
|
23
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
27
28
|
segments:
|
28
29
|
- 0
|
29
30
|
version: "0"
|
30
31
|
requirement: *id001
|
31
32
|
name: rake
|
32
|
-
- !ruby/object:Gem::Dependency
|
33
33
|
prerelease: false
|
34
34
|
type: :development
|
35
|
+
- !ruby/object:Gem::Dependency
|
35
36
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
36
38
|
requirements:
|
37
39
|
- - ">="
|
38
40
|
- !ruby/object:Gem::Version
|
41
|
+
hash: 9
|
39
42
|
segments:
|
40
43
|
- 1
|
41
44
|
- 3
|
42
45
|
version: "1.3"
|
43
46
|
requirement: *id002
|
44
47
|
name: rspec
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
48
|
prerelease: false
|
47
49
|
type: :development
|
50
|
+
- !ruby/object:Gem::Dependency
|
48
51
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
49
53
|
requirements:
|
50
54
|
- - ">="
|
51
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
52
57
|
segments:
|
53
58
|
- 0
|
54
59
|
version: "0"
|
55
60
|
requirement: *id003
|
56
61
|
name: git
|
62
|
+
prerelease: false
|
63
|
+
type: :development
|
57
64
|
description: " This pure Ruby library can read and write PNG images without depending on an external \n image library, like RMagick. It tries to be memory efficient and reasonably fast.\n \n It supports reading and writing all PNG variants that are defined in the specification, \n with one limitation: only 8-bit color depth is supported. It supports all transparency, \n interlacing and filtering options the PNG specifications allows. It can also read and \n write textual metadata from PNG files. Low-level read/write access to PNG chunks is\n also possible.\n \n This library supports simple drawing on the image canvas and simple operations like alpha composition\n and cropping. Finally, it can import from and export to RMagick for interoperability. \n"
|
58
65
|
email:
|
59
66
|
- willem@railsdoctors.com
|
@@ -65,80 +72,83 @@ extra_rdoc_files:
|
|
65
72
|
- README.rdoc
|
66
73
|
- BENCHMARKS.rdoc
|
67
74
|
files:
|
68
|
-
-
|
75
|
+
- .gitignore
|
76
|
+
- BENCHMARKS.rdoc
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- LICENSE
|
80
|
+
- README.rdoc
|
81
|
+
- Rakefile
|
82
|
+
- benchmarks/decoding_benchmark.rb
|
83
|
+
- benchmarks/encoding_benchmark.rb
|
84
|
+
- benchmarks/filesize_benchmark.rb
|
85
|
+
- chunky_png.gemspec
|
86
|
+
- lib/chunky_png.rb
|
69
87
|
- lib/chunky_png/canvas.rb
|
70
|
-
-
|
88
|
+
- lib/chunky_png/canvas/adam7_interlacing.rb
|
71
89
|
- lib/chunky_png/canvas/drawing.rb
|
72
|
-
-
|
73
|
-
- spec/resources/cropped.png
|
74
|
-
- LICENSE
|
75
|
-
- spec/resources/clock_mask_updated.png
|
76
|
-
- spec/resources/pixelstream.rgba
|
77
|
-
- Gemfile
|
78
|
-
- spec/resources/clock_rotate_right.png
|
79
|
-
- spec/resources/ztxt_chunk.png
|
80
|
-
- spec/resources/transparent_gray_10x10.png
|
90
|
+
- lib/chunky_png/canvas/operations.rb
|
81
91
|
- lib/chunky_png/canvas/png_decoding.rb
|
82
|
-
- lib/chunky_png/
|
83
|
-
- spec/resources/lines.png
|
84
|
-
- spec/resources/clock_mask.png
|
85
|
-
- spec/resources/clock_stubbed.png
|
86
|
-
- spec/resources/pixelstream.rgb
|
87
|
-
- tasks/benchmarks.rake
|
88
|
-
- spec/resources/indexed_4bit.png
|
89
|
-
- spec/resources/text_chunk.png
|
90
|
-
- chunky_png.gemspec
|
91
|
-
- benchmarks/decoding_benchmark.rb
|
92
|
-
- spec/resources/gray_10x10_truecolor_alpha.png
|
93
|
-
- lib/chunky_png/color.rb
|
94
|
-
- spec/resources/damaged_chunk.png
|
95
|
-
- spec/resources/rect.png
|
96
|
-
- README.rdoc
|
92
|
+
- lib/chunky_png/canvas/png_encoding.rb
|
97
93
|
- lib/chunky_png/canvas/stream_exporting.rb
|
98
|
-
- spec/resources/clock_flip_horizontally.png
|
99
94
|
- lib/chunky_png/canvas/stream_importing.rb
|
100
|
-
-
|
101
|
-
-
|
95
|
+
- lib/chunky_png/chunk.rb
|
96
|
+
- lib/chunky_png/color.rb
|
97
|
+
- lib/chunky_png/datastream.rb
|
98
|
+
- lib/chunky_png/image.rb
|
99
|
+
- lib/chunky_png/palette.rb
|
102
100
|
- lib/chunky_png/rmagick.rb
|
103
|
-
-
|
104
|
-
- Rakefile
|
105
|
-
- spec/chunky_png/canvas/png_decoding_spec.rb
|
106
|
-
- lib/chunky_png.rb
|
107
|
-
- lib/chunky_png/canvas/png_encoding.rb
|
108
|
-
- .gitignore
|
109
|
-
- spec/resources/16x16_interlaced.png
|
101
|
+
- spec/chunky_png/canvas/adam7_interlacing_spec.rb
|
110
102
|
- spec/chunky_png/canvas/drawing_spec.rb
|
103
|
+
- spec/chunky_png/canvas/operations_spec.rb
|
104
|
+
- spec/chunky_png/canvas/png_decoding_spec.rb
|
111
105
|
- spec/chunky_png/canvas/png_encoding_spec.rb
|
112
|
-
- spec/resources/adam7.png
|
113
|
-
- lib/chunky_png/palette.rb
|
114
|
-
- spec/resources/gray_10x10_indexed.png
|
115
106
|
- spec/chunky_png/canvas_spec.rb
|
116
|
-
- spec/
|
117
|
-
-
|
107
|
+
- spec/chunky_png/color_spec.rb
|
108
|
+
- spec/chunky_png/datastream_spec.rb
|
118
109
|
- spec/chunky_png/image_spec.rb
|
119
|
-
- spec/resources/clock_rotate_180.png
|
120
|
-
- spec/resources/clock_rotate_left.png
|
121
|
-
- BENCHMARKS.rdoc
|
122
|
-
- spec/resources/16x16_non_interlaced.png
|
123
|
-
- lib/chunky_png/chunk.rb
|
124
|
-
- spec/chunky_png/canvas/operations_spec.rb
|
125
|
-
- spec/resources/gray_10x10_truecolor.png
|
126
|
-
- spec/resources/gray_10x10_grayscale.png
|
127
|
-
- spec/resources/pixelstream_reference.png
|
128
|
-
- spec/chunky_png_spec.rb
|
129
|
-
- spec/resources/operations.png
|
130
|
-
- spec/resources/clock_flip_vertically.png
|
131
110
|
- spec/chunky_png/rmagick_spec.rb
|
132
|
-
-
|
111
|
+
- spec/chunky_png_spec.rb
|
112
|
+
- spec/resources/16x16_interlaced.png
|
113
|
+
- spec/resources/16x16_non_interlaced.png
|
114
|
+
- spec/resources/adam7.png
|
115
|
+
- spec/resources/clock.png
|
133
116
|
- spec/resources/clock_base.png
|
134
|
-
-
|
135
|
-
- spec/resources/
|
117
|
+
- spec/resources/clock_flip_horizontally.png
|
118
|
+
- spec/resources/clock_flip_vertically.png
|
119
|
+
- spec/resources/clock_mask.png
|
120
|
+
- spec/resources/clock_mask_updated.png
|
121
|
+
- spec/resources/clock_rotate_180.png
|
122
|
+
- spec/resources/clock_rotate_left.png
|
123
|
+
- spec/resources/clock_rotate_right.png
|
124
|
+
- spec/resources/clock_stubbed.png
|
136
125
|
- spec/resources/clock_updated.png
|
126
|
+
- spec/resources/composited.png
|
127
|
+
- spec/resources/cropped.png
|
128
|
+
- spec/resources/damaged_chunk.png
|
137
129
|
- spec/resources/damaged_signature.png
|
138
|
-
- spec/chunky_png/datastream_spec.rb
|
139
|
-
- lib/chunky_png/canvas/adam7_interlacing.rb
|
140
|
-
- spec/chunky_png/color_spec.rb
|
141
130
|
- spec/resources/gray_10x10.png
|
131
|
+
- spec/resources/gray_10x10_grayscale.png
|
132
|
+
- spec/resources/gray_10x10_grayscale_alpha.png
|
133
|
+
- spec/resources/gray_10x10_indexed.png
|
134
|
+
- spec/resources/gray_10x10_truecolor.png
|
135
|
+
- spec/resources/gray_10x10_truecolor_alpha.png
|
136
|
+
- spec/resources/indexed_4bit.png
|
137
|
+
- spec/resources/lines.png
|
138
|
+
- spec/resources/operations.png
|
139
|
+
- spec/resources/pixelstream.rgb
|
140
|
+
- spec/resources/pixelstream.rgba
|
141
|
+
- spec/resources/pixelstream_best_compression.png
|
142
|
+
- spec/resources/pixelstream_fast_rgba.png
|
143
|
+
- spec/resources/pixelstream_reference.png
|
144
|
+
- spec/resources/rect.png
|
145
|
+
- spec/resources/replaced.png
|
146
|
+
- spec/resources/text_chunk.png
|
147
|
+
- spec/resources/transparent_gray_10x10.png
|
148
|
+
- spec/resources/ztxt_chunk.png
|
149
|
+
- spec/spec_helper.rb
|
150
|
+
- tasks/benchmarks.rake
|
151
|
+
- tasks/github-gem.rake
|
142
152
|
has_rdoc: true
|
143
153
|
homepage: http://wiki.github.com/wvanbergen/chunky_png
|
144
154
|
licenses: []
|
@@ -154,35 +164,39 @@ rdoc_options:
|
|
154
164
|
require_paths:
|
155
165
|
- lib
|
156
166
|
required_ruby_version: !ruby/object:Gem::Requirement
|
167
|
+
none: false
|
157
168
|
requirements:
|
158
169
|
- - ">="
|
159
170
|
- !ruby/object:Gem::Version
|
171
|
+
hash: 3
|
160
172
|
segments:
|
161
173
|
- 0
|
162
174
|
version: "0"
|
163
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
none: false
|
164
177
|
requirements:
|
165
178
|
- - ">="
|
166
179
|
- !ruby/object:Gem::Version
|
180
|
+
hash: 3
|
167
181
|
segments:
|
168
182
|
- 0
|
169
183
|
version: "0"
|
170
184
|
requirements: []
|
171
185
|
|
172
186
|
rubyforge_project:
|
173
|
-
rubygems_version: 1.3.
|
187
|
+
rubygems_version: 1.3.7
|
174
188
|
signing_key:
|
175
189
|
specification_version: 3
|
176
190
|
summary: Pure ruby library for read/write, chunk-level access to PNG files
|
177
191
|
test_files:
|
178
192
|
- spec/chunky_png/canvas/adam7_interlacing_spec.rb
|
179
|
-
- spec/chunky_png/canvas/png_decoding_spec.rb
|
180
193
|
- spec/chunky_png/canvas/drawing_spec.rb
|
194
|
+
- spec/chunky_png/canvas/operations_spec.rb
|
195
|
+
- spec/chunky_png/canvas/png_decoding_spec.rb
|
181
196
|
- spec/chunky_png/canvas/png_encoding_spec.rb
|
182
197
|
- spec/chunky_png/canvas_spec.rb
|
198
|
+
- spec/chunky_png/color_spec.rb
|
199
|
+
- spec/chunky_png/datastream_spec.rb
|
183
200
|
- spec/chunky_png/image_spec.rb
|
184
|
-
- spec/chunky_png/canvas/operations_spec.rb
|
185
|
-
- spec/chunky_png_spec.rb
|
186
201
|
- spec/chunky_png/rmagick_spec.rb
|
187
|
-
- spec/
|
188
|
-
- spec/chunky_png/color_spec.rb
|
202
|
+
- spec/chunky_png_spec.rb
|