phantom_svg 1.1.9 → 1.2.0
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.
- checksums.yaml +4 -4
- data/lib/phantom/parser/png_reader.rb +1 -2
- data/lib/phantom/parser/png_writer.rb +2 -3
- data/phantom_svg.gemspec +2 -2
- data/spec/images/uppercase.JPG +0 -0
- metadata +9 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 392b99f71a8c4559d7f8f48f8bca99cd3fd3a725
|
|
4
|
+
data.tar.gz: 357b5f5f86aacf1b9c72cb127c195291c3d42f7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c8d0b6ec632de41f1126f2fcb53bc81f7fde410767b52e215191fcf512e8db54799518edbcf4e7d3fa7731344ab5ac0b7394356271972dd7891d8a0bdd7a841
|
|
7
|
+
data.tar.gz: 1c03fefbbaa4b3ef6b99bd68a28d9a88daeaecef39dc38effbef1989dc0ba891b92181c428f3ffa2ebbcf9fdda2e0c53ff337aa58b857b3d18de45234c610a50
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
require 'rapngasm'
|
|
3
2
|
require 'rsvg2'
|
|
4
3
|
require 'tmpdir'
|
|
@@ -18,7 +17,7 @@ module Phantom
|
|
|
18
17
|
|
|
19
18
|
return if path.nil? || path.empty?
|
|
20
19
|
|
|
21
|
-
apngasm = APNGAsm.new
|
|
20
|
+
apngasm = APNG::APNGAsm.new
|
|
22
21
|
apngasm.disassemble(path)
|
|
23
22
|
|
|
24
23
|
if apngasm.frame_count == 1
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
require 'tmpdir'
|
|
3
2
|
require 'rapngasm'
|
|
4
3
|
require 'cairo'
|
|
@@ -18,7 +17,7 @@ module Phantom
|
|
|
18
17
|
|
|
19
18
|
object.set_size
|
|
20
19
|
|
|
21
|
-
apngasm = APNGAsm.new
|
|
20
|
+
apngasm = APNG::APNGAsm.new
|
|
22
21
|
convert_frames(apngasm, object)
|
|
23
22
|
result = apngasm.assemble(path)
|
|
24
23
|
|
|
@@ -35,7 +34,7 @@ module Phantom
|
|
|
35
34
|
object.frames.each_with_index do |frame, index|
|
|
36
35
|
tmp_file_path = "#{dir}/tmp#{index}"
|
|
37
36
|
create_temporary_file(tmp_file_path, frame, object.width.to_i, object.height.to_i)
|
|
38
|
-
apngasm.add_frame_file("#{tmp_file_path}.png", frame.duration.to_f * 1000, 1000)
|
|
37
|
+
apngasm.add_frame_file("#{tmp_file_path}.png", (frame.duration.to_f * 1000).to_i, 1000)
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
end
|
data/phantom_svg.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.platform = Gem::Platform::RUBY
|
|
3
3
|
s.name = 'phantom_svg'
|
|
4
|
-
s.version = '1.
|
|
4
|
+
s.version = '1.2.0'
|
|
5
5
|
s.license = 'LGPL-3'
|
|
6
6
|
s.summary = 'Hight end SVG manipulation tools for Ruby'
|
|
7
7
|
s.description = 'Hight end SVG manipulation tools for Ruby.\n' \
|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.requirements << 'libapngasm'
|
|
18
18
|
|
|
19
19
|
s.add_dependency 'cairo', '~> 1.14', '~> 1.14.1'
|
|
20
|
-
s.add_dependency 'rapngasm', '~> 3.
|
|
20
|
+
s.add_dependency 'rapngasm', '~> 3.2', '~> 3.2.0'
|
|
21
21
|
s.add_dependency 'rsvg2', '~> 2.2', '~> 2.2.5'
|
|
22
22
|
s.add_dependency 'rmagick', '~> 2.15', '~> 2.15.0'
|
|
23
23
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phantom_svg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rika Yoshida
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2015-
|
|
13
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: cairo
|
|
@@ -38,20 +38,20 @@ dependencies:
|
|
|
38
38
|
requirements:
|
|
39
39
|
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '3.
|
|
41
|
+
version: '3.2'
|
|
42
42
|
- - "~>"
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
|
-
version: 3.
|
|
44
|
+
version: 3.2.0
|
|
45
45
|
type: :runtime
|
|
46
46
|
prerelease: false
|
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
|
48
48
|
requirements:
|
|
49
49
|
- - "~>"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version: '3.
|
|
51
|
+
version: '3.2'
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 3.
|
|
54
|
+
version: 3.2.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rsvg2
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -192,6 +192,7 @@ files:
|
|
|
192
192
|
- spec/images/test_frames/test2.json
|
|
193
193
|
- spec/images/test_frames/test2.xml
|
|
194
194
|
- spec/images/test_raster.png
|
|
195
|
+
- spec/images/uppercase.JPG
|
|
195
196
|
- spec/phantom/svg_spec.rb
|
|
196
197
|
- spec/spec_helper.rb
|
|
197
198
|
homepage: http://github.com/Genshin/phantom_svg
|
|
@@ -215,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
215
216
|
requirements:
|
|
216
217
|
- libapngasm
|
|
217
218
|
rubyforge_project:
|
|
218
|
-
rubygems_version: 2.4.
|
|
219
|
+
rubygems_version: 2.4.8
|
|
219
220
|
signing_key:
|
|
220
221
|
specification_version: 4
|
|
221
222
|
summary: Hight end SVG manipulation tools for Ruby
|
|
@@ -289,5 +290,6 @@ test_files:
|
|
|
289
290
|
- spec/images/test_frames/test2.json
|
|
290
291
|
- spec/images/test_frames/test2.xml
|
|
291
292
|
- spec/images/test_raster.png
|
|
293
|
+
- spec/images/uppercase.JPG
|
|
292
294
|
- spec/phantom/svg_spec.rb
|
|
293
295
|
- spec/spec_helper.rb
|