Parent

Files

Class/Module Index [+]

Quicksearch

Dragonfly::ImageMagick::Analyser

Public Instance Methods

aspect_ratio(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 16
def aspect_ratio(temp_object)
  attrs = identify(temp_object)
  attrs[:width].to_f / attrs[:height]
end
depth(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 33
def depth(temp_object)
  identify(temp_object)[:depth]
end
format(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 43
def format(temp_object)
  identify(temp_object)[:format]
end
height(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 12
def height(temp_object)
  identify(temp_object)[:height]
end
image?(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 47
def image?(temp_object)
  !!catch(:unable_to_handle){ identify(temp_object) }
end
landscape(temp_object) click to toggle source
Alias for: landscape?
landscape?(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 27
def landscape?(temp_object)
  attrs = identify(temp_object)
  attrs[:width] >= attrs[:height]
end
Also aliased as: landscape
number_of_colors(temp_object) click to toggle source
Alias for: number_of_colours
number_of_colours(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 37
def number_of_colours(temp_object)
  details = raw_identify(temp_object, '-verbose -unique')
  details[/Colors: (\d+)/, 1].to_i
end
Also aliased as: number_of_colors
portrait(temp_object) click to toggle source
Alias for: portrait?
portrait?(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 21
def portrait?(temp_object)
  attrs = identify(temp_object)
  attrs[:width] <= attrs[:height]
end
Also aliased as: portrait
width(temp_object) click to toggle source
# File lib/dragonfly/image_magick/analyser.rb, line 8
def width(temp_object)
  identify(temp_object)[:width]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.