Detailed Image API Parameters Example

Here's a visual tour of how you can extract a region and manipulate the image further.

We'll start with the full size version of this image and crop out just the building. You can see where the architect was testing out colors, so it'd be nice to crop those out.

The resource we'll use is Perspective from the West - Front by Henry L. Kamphoefner.

This is the URL we will end up with:,2280,1884,952/500,/0/default.jpg

Let's walk through it.

Image Server Base URL

Highlighted is the portion of the URL that would be the same for all of the images delivered from the same image server.,2280,1884,952/500,/0/default.jpg


The identifier is: mc00198-008-ff0051-000-001_0001,2280,1884,952/500,/0/default.jpg


Our single xywh parameter value is 2016,2280,1884,952. We can break out the individual parameters like this:

parameter value
x 2016
y 2280
w 1884
h 952

Region: x

To get the x position we count over 2016 pixels.

Region: y

We then go down from the top by 2280 pixels to get the y position.

Region: xy Point

What we're really doing is selecting the xy point on the image.

Region: w

From that xy point we measure out the width in pixels.

Region: h

Finally from the xy point we measure out the height in pixels.

Selected Region

Here's the region we've selected from the full image based on our xywh parameters.

Full Size Image of Selected Region


That's still quite a large image so we can scale the image down. In this case the image is scaled down to 500 pixels and the height is scaled proportionally. We'll see other examples of possible size values in the next section.,2280,1884,952/500,/0/default.jpg


Let's say we wanted to rotate the image 180 degrees. Our URL would look like this:,2280,1884,952/500,/180/default.jpg


We requested the default quality through. We could also ask for a gray version:,2280,1884,952/500,/0/gray.jpg


We request a JPEG image:,2280,1884,952/500,/180/default.jpg

Last modified by Jason Ronallo 2017-09-06 20:31:18
Created by Jason Ronallo 2017-09-03 14:02:03

results matching ""

    No results matching ""