Class: Riiif::Size::Imagemagick::HeightDecoder
- Inherits:
-
Object
- Object
- Riiif::Size::Imagemagick::HeightDecoder
- Defined in:
- app/services/riiif/size/imagemagick/height_decoder.rb
Overview
The image or region should be scaled so that its height is exactly equal to the provided parameter, and the width will be a calculated value that maintains the aspect ratio of the extracted region
Instance Method Summary collapse
-
#decode ⇒ String
A resize directive for imagemagick to use.
-
#initialize(height) ⇒ HeightDecoder
constructor
A new instance of HeightDecoder.
Constructor Details
#initialize(height) ⇒ HeightDecoder
Returns a new instance of HeightDecoder.
8 9 10 |
# File 'app/services/riiif/size/imagemagick/height_decoder.rb', line 8 def initialize(height) @height = height end |
Instance Method Details
#decode ⇒ String
Returns a resize directive for imagemagick to use.
13 14 15 |
# File 'app/services/riiif/size/imagemagick/height_decoder.rb', line 13 def decode "x#{@height}" end |