module ImageProcessing::MiniMagick
Public Class Methods
Source
# File lib/image_processing/mini_magick.rb, line 8 def self.convert_shim(&block) if ::MiniMagick.respond_to?(:convert) ::MiniMagick.convert(&block) else ::MiniMagick::Tool::Convert.new(&block) end end
Source
# File lib/image_processing/mini_magick.rb, line 17 def self.valid_image?(file) convert_shim do |convert| convert << file.path convert << "null:" end true rescue ::MiniMagick::Error false end
Returns whether the given image file is processable.