Image-manipulation functions defined in tiles

The tiles.ss teachpack provides several useful functions for manipulating images:

image-above : image image -> image
produces an image with the first image "above" (i.e. closer to the top of the screen) the second. The pinholes are lined up in the x dimension; the pinhole of the result is halfway between the pinholes of the two images.
image-beside : image image -> image
produces an image with the first image to the left of the second. The pinholes are lined up in the y dimension; the pinhole of the result is halfway between the pinholes of the two images.
reflect-vert : image -> image
Reflects the given image top-to-bottom.
reflect-horiz : image -> image
Reflects the given image left-to-right and bottom.
reflect-main-diag : image -> image
Reflects the given image across the diagonal from top-left to bottom-right; in other words, it swaps top-right with bottom-left.
reflect-other-diag : image -> image
Reflects the given image across the diagonal from top-right to bottom-left; in other words, it swaps top-left with bottom-right.
rotate-cw : image -> image
Rotates the given image 90 degrees clockwise around its pinhole.
rotate-ccw : image -> image
Rotates the given image 90 degrees counterclockwise around its pinhole.
rotate-180 : image -> image
Rotates the given image 180 degrees around its pinhole.
show-pinhole : image -> image
Adds a small black dot to the image so you can see where the pinhole is (useful in debugging).

If you're working with the tiles.ss teachpack, you'll probably also want to load the image.ss teachpack (although either one can be used without the other). Documentation for image.ss is already in DrScheme: go to the "Help" menu, choose "Help Desk", and type "image.ss" into the search field. The functions you're most likely to use from "image.ss" are


Last modified: Tue Jan 31 16:13:33 EST 2006
Stephen Bloch / sbloch@adelphi.edu