Sha256: 081061ff5338502cdcd2a45f2db3e418f8ba0c4dce4f39631b1189e61b1a3881
Contents?: true
Size: 579 Bytes
Versions: 12
Compression:
Stored size: 579 Bytes
Contents
module IIIF::Image module Size # The width and height of the returned image is scaled to n% of the width and height # of the extracted region. The aspect ratio of the returned image is the same as that # of the extracted region. class Percent # @param percentage [Float] def initialize(percentage) @percentage = percentage end attr_reader :percentage # @return [Float] scale factor between 0 and 1 def scale percentage / 100 end def to_s "pct:#{percentage}" end end end end
Version data entries
12 entries across 12 versions & 2 rubygems