This is a beta version of migrating these workshop materials to a new platform. If you run into issues please file an issue or click on the edit link above and submit a pull request. You can use the previous version of the workshop materials as a fallback.
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:
Let’s walk through it.
Highlighted is the portion of the URL that would be the same for all of the images delivered from the same image server.
The identifier is:
xywh parameter value is
2016,2280,1884,952. We can break out the individual parameters like this:
To get the
x position we count over 2016 pixels.
We then go down from the top by 2280 pixels to get the
What we’re really doing is selecting the
xy point on the image.
From that xy point we measure out the width in pixels.
Finally from the xy point we measure out the height in pixels.
Here’s the region we’ve selected from the full image based on our
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.
Let’s say we wanted to rotate the image 180 degrees. Our URL would look like this:
We requested the default quality through. We could also ask for a gray version:
We request a JPEG image: