Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #96 from gmanley/graphicsmagick-fix-squashed

Restore compatibility with GraphicsMagick.
  • Loading branch information...
commit de9e8c312cfe3afef8307133b361a5dbde76b599 2 parents 496af2e + 432c913
@thiagofm thiagofm authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/mini_magick.rb
View
13 lib/mini_magick.rb
@@ -21,15 +21,15 @@ def choose_processor
self.processor = "gm"
end
end
-
+
def image_magick_version
@@version ||= Gem::Version.create(`mogrify --version`.split(" ")[2].split("-").first)
end
-
+
def minimum_image_magick_version
@@minimum_version ||= Gem::Version.create("6.6.3")
end
-
+
def valid_version_installed?
image_magick_version >= minimum_image_magick_version
end
@@ -395,6 +395,11 @@ def run_command(command, *args)
# -ping "efficiently determine image characteristics."
if command == 'identify'
args.unshift '-ping'
+
+ # GraphicsMagick's identify has no -quiet option
+ if MiniMagick.processor.to_s == 'gm'
+ args.delete('-quiet')
+ end
end
run(CommandBuilder.new(command, *args))
@@ -486,7 +491,7 @@ def add_command(command, *options)
end
end
end
-
+
def escape_string(value)
Shellwords.escape(value.to_s)
end
Please sign in to comment.
Something went wrong with that request. Please try again.