class ImageAnalyzer

Ruby on Rails 6.0.6

Since v5.2.8.1

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Extracts 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

ActiveStorage::Analyzer

Methods (defined here)

Private methods

(2) Implementation detail — not part of the public API.

Methods (inherited)

From ActiveStorage::Analyzer (3)
From Object (17)
From ActiveRecord::TestFixtures (4)
From ActiveSupport::Concern (2)

Type at least 2 characters to search.

↑↓ navigate · open · esc close