Sha256: 54867366854437372bf30feda83e5c89072785203f9bd64432b0cac52fd752fd

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true

module GeoblacklightAdmin
  class ImageService
    module Iiif
      ##
      # Formats and returns a thumbnail url from an International Image
      # Interoperability Framework endpoint.
      # @param [SolrDocument]
      # @param [Integer] thumbnail size
      # @return [String] iiif thumbnail url
      def self.image_url(document, size)
        "#{document.viewer_endpoint.gsub("info.json", "")}full/#{size},/0/default.jpg"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geoblacklight_admin-0.4.1 app/services/geoblacklight_admin/image_service/iiif.rb
geoblacklight_admin-0.4.0 app/services/geoblacklight_admin/image_service/iiif.rb