Sha256: 3c213fa301bcd827d3b4fc5081251031c88fc5c63a4b09e5d4b02ee4a54834b6

Contents?: true

Size: 520 Bytes

Versions: 14

Compression:

Stored size: 520 Bytes

Contents

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

        # @return [String] a resize directive for imagemagick to use
        def decode
          "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/height_decoder.rb
riiif-1.7.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.6.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.5.1 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.5.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.4.4 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.4.3 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.4.2 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.4.1 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.4.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.3.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.2.0 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.1.3 app/services/riiif/size/imagemagick/height_decoder.rb
riiif-1.1.2 app/services/riiif/size/imagemagick/height_decoder.rb