class ImageAnalyzer
Ruby on Rails 6.0.6
Since v5.2.8.1Extracts width and height in pixels from an image blob.
If the image contains EXIF data indicating its angle is 90 or 270 degrees, its width and height are swapped for convenience.
Example:
ActiveStorage::Analyzer::ImageAnalyzer.new(blob).metadata # => { width: 4104, height: 2736 }
This analyzer relies on the third-party MiniMagick gem. MiniMagick requires the ImageMagick system library.
Inherits from
Methods (defined here)
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From ActiveStorage::Analyzer (3)
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options