module ImageProcessing::Vips
Public Class Methods
valid_image?(file)
click to toggle source
Returns whether the given image file is processable.
# File lib/image_processing/vips.rb, line 11 def self.valid_image?(file) ::Vips::Image.new_from_file(file.path, access: :sequential).avg true rescue ::Vips::Error false end