zpng 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/zpng/image.rb +4 -2
- data/zpng.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/zpng/image.rb
CHANGED
@@ -59,12 +59,14 @@ module ZPNG
|
|
59
59
|
|
60
60
|
def _from_string x
|
61
61
|
if x
|
62
|
-
if x[PNG_HDR]
|
62
|
+
if PNG_HDR.size.times.all?{ |i| x[i].ord == PNG_HDR[i].ord } # encoding error workaround
|
63
63
|
# raw image data
|
64
64
|
@data = x
|
65
|
-
|
65
|
+
elsif File.exist?(x)
|
66
66
|
# filename
|
67
67
|
@data = File.binread(x)
|
68
|
+
else
|
69
|
+
raise "Don't know what #{x.inspect} is"
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|
data/zpng.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: zpng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Andrey "Zed" Zaikin
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
segments:
|
156
156
|
- 0
|
157
|
-
hash:
|
157
|
+
hash: -657082677898355514
|
158
158
|
none: false
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|