mojo_magick 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mojo_magick.rb +5 -1
- data/lib/mojo_magick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50a45302825af74fc985fd903d6f493407c243f4
|
4
|
+
data.tar.gz: 7d535139b1d46cf04ffa4b003d290b3c806e7e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd3cfe567c2f35d7a87a68843b7139f728ad388fdecbbac03ef0a1f97468dfe3c0b71fb4705372e5b36044c9a0f0cc2346efe8fa86119cf6493bcb462dfaedc3
|
7
|
+
data.tar.gz: 9b8db5160797881095e8551a4540cd4e10ef8f23efb4d8d2d22bcef9d2cc45f703c263442822caf04f169ff64192a511259eb1bbd44b2c5bdcbf523b79fa509c
|
data/Gemfile.lock
CHANGED
data/lib/mojo_magick.rb
CHANGED
@@ -146,11 +146,15 @@ module MojoMagick
|
|
146
146
|
Font.all
|
147
147
|
end
|
148
148
|
|
149
|
+
def MojoMagick::get_format(source_file, format_string)
|
150
|
+
retval = raw_command("identify", "-format \"#{format_string}\" \"#{source_file}\"")
|
151
|
+
end
|
152
|
+
|
149
153
|
# returns an empty hash or a hash with :width and :height set (e.g. {:width => INT, :height => INT})
|
150
154
|
# raises MojoFailed when results are indeterminate (width and height could not be determined)
|
151
155
|
def MojoMagick::get_image_size(source_file)
|
152
156
|
# returns width, height of image if available, nil if not
|
153
|
-
retval =
|
157
|
+
retval = self.get_format(source_file, %q|w:%w h:%h|)
|
154
158
|
return {} if !retval
|
155
159
|
width = retval.match(%r{w:([0-9]+) })
|
156
160
|
width = width ? width[1].to_i : nil
|
data/lib/mojo_magick/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mojo_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Midgley
|
@@ -124,7 +124,7 @@ rubyforge_project: mojo_magick
|
|
124
124
|
rubygems_version: 2.2.2
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary: mojo_magick-0.5.
|
127
|
+
summary: mojo_magick-0.5.6
|
128
128
|
test_files:
|
129
129
|
- test/fixtures/5742.jpg
|
130
130
|
- test/fixtures/not_an_image.jpg
|