Class: Riiif::Size::Imagemagick::AbsoluteDecoder
- Inherits:
-
Object
- Object
- Riiif::Size::Imagemagick::AbsoluteDecoder
- Defined in:
- app/services/riiif/size/imagemagick/absolute_decoder.rb
Overview
The width and height of the returned image are exactly w and h. The aspect ratio of the returned image may be different than the extracted region, resulting in a distorted image.
Instance Method Summary collapse
-
#decode ⇒ String
A resize directive for imagemagick to use.
-
#initialize(width, height) ⇒ AbsoluteDecoder
constructor
A new instance of AbsoluteDecoder.
Constructor Details
#initialize(width, height) ⇒ AbsoluteDecoder
8 9 10 11 |
# File 'app/services/riiif/size/imagemagick/absolute_decoder.rb', line 8 def initialize(width, height) @width = width @height = height end |
Instance Method Details
#decode ⇒ String
14 15 16 |
# File 'app/services/riiif/size/imagemagick/absolute_decoder.rb', line 14 def decode "#{@width}x#{@height}!" end |