Class: Riiif::Size::Imagemagick::WidthDecoder
- Inherits:
-
Object
- Object
- Riiif::Size::Imagemagick::WidthDecoder
- Defined in:
- app/services/riiif/size/imagemagick/width_decoder.rb
Overview
The image or region should be scaled so that its width is exactly equal to the provided parameter, and the height 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(width) ⇒ WidthDecoder
constructor
A new instance of WidthDecoder.
Constructor Details
#initialize(width) ⇒ WidthDecoder
Returns a new instance of WidthDecoder.
8 9 10 |
# File 'app/services/riiif/size/imagemagick/width_decoder.rb', line 8 def initialize(width) @width = width end |
Instance Method Details
#decode ⇒ String
Returns a resize directive for imagemagick to use.
13 14 15 |
# File 'app/services/riiif/size/imagemagick/width_decoder.rb', line 13 def decode @width.to_s end |