[plt-scheme] 2htdp/image & 2htdp/universe update

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Jan 6 00:15:22 EST 2010

Recently, in SVN and in the nightly builds, 2htdp/universe changed to
support both the original htdp/image library as well as the
2htdp/image library. Specifically:

  - 2htdp/universe no longer exports any image library; require both
2htdp/universe and either htdp/image or 2htdp/image

  - 2htdp/image now supports cropping; see place-image and
place-image/align (as well as 'crop').

  - image equality is now defined in terms of drawing the images at
their current sizes, specifically comparing the particular set of
pixel values that get drawn by the two images to see if they are the

The change to the way image equality works simplifies the semantics of
image comparison significantly (and, in the presence of cropping, I'm
not even sure I want to try to figure out a structural equality), but
at a runtime cost. Nevertheless, image comparison in 2htdp/image is
still between 3x and 30x faster than equality on htdp/image images,
depending on the complexity of the image (the more complex the image,
the better 2htdp/image performs, relative to htdp/image).

Note that these changes are not set in stone yet. We welcome
experimentation and feedback on them.


Posted on the users mailing list.