Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

Munchmuseet/IIIF-Image-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

This documents how to retrieve images fromhttps://emunch.emuseum.no using the IIIF Image and Presentation APIs. The base URI ({scheme}://{server}{/prefix}/{identifier}) for the API ishttps://munch.emuseum.com/apis/iiif/image/v2/{identifier}. The identifier is the media ID. The media ID can be found in an image's URL. This URL can be requested from the eMuseum API using something like this:GET https://munch.emuseum.com/objects/json?mediaExistence=True&key={key}. In the response look forprimaryMedia:

"primaryMedia": {"value": "/internal/media/dispatcher/7483/resize%25253Aformat%25253Dthumbnail;jsessionid=54EDD47D73197613988875184D91DAC7"}

The media ID is the number afterdispatcher/.

The API is also documented withPostman.

Image request URI syntax

The syntax for requesting an image is{scheme}://{server}{/prefix}/{identifier}/{region}/{size}/{rotation}/{quality}.{format}.

Image information request URI syntax

The syntax for requesting information about an image is{scheme}://{server}{/prefix}/{identifier}/info.json.

Image request parameters

Region

The region parameter defines the rectangular portion of the full image to be returned. Region can be specified by pixel coordinates, percentage or by the value “full”, which specifies that the entire image should be returned.

FormDescription
fullThe complete image is returned, without any cropping.
squareThe region is defined as an area where the width and height are both equal to the length of the shorter dimension of the complete image. The region may be positioned anywhere in the longer dimension of the image content at the server’s discretion, and centered is often a reasonable default.
x,y,w,hThe region of the full image to be returned is specified in terms of absolute pixel values. The value of x represents the number of pixels from the 0 position on the horizontal axis. The value of y represents the number of pixels from the 0 position on the vertical axis. Thus the x,y position 0,0 is the upper left-most pixel of the image. w represents the width of the region and h represents the height of the region in pixels.
pct:x,y,w,hThe region to be returned is specified as a sequence of percentages of the full image’s dimensions, as reported in the image information document. Thus, x represents the number of pixels from the 0 position on the horizontal axis, calculated as a percentage of the reported width. w represents the width of the region, also calculated as a percentage of the reported width. The same applies to y and h respectively. These may be floating point numbers.

Thesquare form is not implemented in this API.

Size

The size parameter determines the dimensions to which the extracted region is to be scaled.

FormDescription
fullThe image or region is not scaled, and is returned at its full size. Notedeprecation warning
maxThe image or region is returned at the maximum size available, as indicated by maxWidth, maxHeight, maxArea in the profile description. This is the same as full if none of these properties are provided.
w,The image or region should be scaled so that its width is exactly equal to w, and the height will be a calculated value that maintains the aspect ratio of the extracted region.
,hThe image or region should be scaled so that its height is exactly equal to h, and the width will be a calculated value that maintains the aspect ratio of the extracted region.
pct:nThe 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.
w,hThe width and height of the returned image are exactly w and h. The aspect ratio of the returned image may be different than the extracted region, resulting in a distorted image.
!w,hThe image content is scaled for the best fit such that the resulting width and height are less than or equal to the requested width and height. The exact scaling may be determined by the service provider, based on characteristics including image quality and system performance. The dimensions of the returned image content are calculated to maintain the aspect ratio of the extracted region.

Rotation

The rotation parameter specifies mirroring and rotation. A leading exclamation mark (“!”) indicates that the image should be mirrored by reflection on the vertical axis before any rotation is applied. The numerical value represents the number of degrees of clockwise rotation, and may be any floating point number from 0 to 360.

FormDescription
nThe degrees of clockwise rotation from 0 up to 360.
!nThe image should be mirrored and then rotated as above.

This API only allows the values0,90,180,270 and360. Mirroring is not implemented.

Quality

The quality parameter determines whether the image is delivered in color, grayscale or black and white.

QualityParameter Returned
colorThe image is returned in full color.
grayThe image is returned in grayscale, where each pixel is black, white or any shade of gray in between.
bitonalThe image returned is bitonal, where each pixel is either black or white.
defaultThe image is returned using the server’s default quality (e.g. color, gray or bitonal) for the image.

Format

The format of the returned image is expressed as an extension at the end of the URI.

ExtensionMIME Type
jpgimage/jpeg
tifimage/tiff
pngimage/png
gifimage/gif
jp2image/jp2
pdfapplication/pdf
webpimage/webp

Onlyjpgandpngare implemented. All other values are invalid.

Full documentation

SeeIIIF Image API 2.1.1 andIIIF Presentation API 2.1.1 for full documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp