Sha256: c18c3f63ae827866ad3ddf581bc4088ac7ed5528c79865f7d5c59cec511fa128

Contents?: true

Size: 789 Bytes

Versions: 20

Compression:

Stored size: 789 Bytes

Contents

module Openseadragon
  class Image
    attr_accessor :id, :width, :height

    class_attribute :file_resolver
   
    class << self
      def find(id)
        file_resolver.find(id)
      end
    end

    def initialize(attributes = {})
      self.id = attributes[:id]
      self.width = attributes[:width]
      self.height = attributes[:height]
    end
    
    def to_tilesource
      {
        identifier: id,
        width: width,
        height: height,
        scale_factors: [1, 2, 3, 4, 5],
        formats: [:jpg, :png],
        qualities: [:native, :bitonal, :grey, :color],
        profile: "http://library.stanford.edu/iiif/image-api/compliance.html#level3",
        tile_width: 1024,
        tile_height: 1024,
        image_host: '/image-service',
      }
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
openseadragon-0.8.0 app/models/openseadragon/image.rb
openseadragon-0.7.0 app/models/openseadragon/image.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/openseadragon-0.6.0/app/models/openseadragon/image.rb
openseadragon-0.6.0 app/models/openseadragon/image.rb
openseadragon-0.5.0 app/models/openseadragon/image.rb
openseadragon-0.4.0 app/models/openseadragon/image.rb
openseadragon-0.3.3 app/models/openseadragon/image.rb
openseadragon-0.3.2 app/models/openseadragon/image.rb
openseadragon-0.3.1 app/models/openseadragon/image.rb
openseadragon-0.3.0 app/models/openseadragon/image.rb
openseadragon-0.2.1 app/models/openseadragon/image.rb
openseadragon-0.2.0 app/models/openseadragon/image.rb
openseadragon-0.1.0 app/models/openseadragon/image.rb
openseadragon-0.0.9 app/models/openseadragon/image.rb
openseadragon-0.0.8 app/models/openseadragon/image.rb
openseadragon-0.0.7 app/models/openseadragon/image.rb
openseadragon-0.0.6 app/models/openseadragon/image.rb
openseadragon-0.0.5 app/models/openseadragon/image.rb
openseadragon-0.0.4 app/models/openseadragon/image.rb
openseadragon-0.0.3 app/models/openseadragon/image.rb