Sha256: 2c972724f886439cde3331d169f14d513962f9a0b65dd6b7d42a58db94fa0a11

Contents?: true

Size: 498 Bytes

Versions: 8

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true

module GeoblacklightSidecarImages
  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

8 entries across 8 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.8.1 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.8.0 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.7.0 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.6.5 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.6.4 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.6.2 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.6.1 app/services/geoblacklight_sidecar_images/image_service/iiif.rb
geoblacklight_sidecar_images-0.6.0 app/services/geoblacklight_sidecar_images/image_service/iiif.rb