Sha256: ea8fe2161cefe7f3f85519a3e689151aba00d6f607463f93952b195b558406b1
Contents?: true
Size: 538 Bytes
Versions: 14
Compression:
Stored size: 538 Bytes
Contents
module Riiif module Region module Imagemagick # decodes requested cooridnates into an imagemagick crop directive class AbsoluteDecoder def initialize(x, y, width, height) @x = x @y = y @width = width @height = height end # @return [String] a region for imagemagick to decode # (appropriate for passing to the -crop parameter) def decode "#{@width}x#{@height}+#{@x}+#{@y}" end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems