class MiniMagick::Image

Constants

MIME_TYPES

Public Instance Methods

dup() click to toggle source

creates an independent copy of the file.

# File lib/misc/mini_magick_extensions.rb, line 82
def dup
  if ::MiniMagick::Image.respond_to?(:read) # v3
    self.class.read(to_blob)
  else # v1
    self.class.from_blob(to_blob, File.extname(path))
  end
end
mime_type() click to toggle source

determines the MIME type of this image file. nil if the file type is not known, or if no image has been loaded.

# File lib/misc/mini_magick_extensions.rb, line 77
def mime_type
  MIME_TYPES[format]
end