lib/paperclip/geometry.rb in thoughtbot-paperclip-2.2.2 vs lib/paperclip/geometry.rb in thoughtbot-paperclip-2.2.3
- old
+ new
@@ -14,10 +14,10 @@
# Uses ImageMagick to determing the dimensions of a file, passed in as either a
# File or path.
def self.from_file file
file = file.path if file.respond_to? "path"
geometry = begin
- Paperclip.run("identify", %Q[-format "%wx%h" "#{file}"])
+ Paperclip.run("identify", %Q[-format "%wx%h" "#{file}"[0]])
rescue PaperclipCommandLineError
""
end
parse(geometry) ||
raise(NotIdentifiedByImageMagickError.new("#{file} is not recognized by the 'identify' command."))