Sha256: 53afcca2a1c5a2b3ad97231bb1681b0b5a2e0245e4a934f753fc81af95e8954c

Contents?: true

Size: 546 Bytes

Versions: 14

Compression:

Stored size: 546 Bytes

Contents

module Riiif
  module Size
    module Imagemagick
      # 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.
      class AbsoluteDecoder
        def initialize(width, height)
          @width = width
          @height = height
        end

        # @return [String] a resize directive for imagemagick to use
        def decode
          "#{@width}x#{@height}!"
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
riiif-1.7.1 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.7.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.6.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.5.1 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.5.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.4.4 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.4.3 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.4.2 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.4.1 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.4.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.3.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.2.0 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.1.3 app/services/riiif/size/imagemagick/absolute_decoder.rb
riiif-1.1.2 app/services/riiif/size/imagemagick/absolute_decoder.rb