Sha256: a448e8556efcdbef8c6178b4854c7cb77fba28542f83d53ff3bdb3b61f343e24

Contents?: true

Size: 514 Bytes

Versions: 14

Compression:

Stored size: 514 Bytes

Contents

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

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