[racket] Thumbnailing

From: Stephen Bloch (bloch at adelphi.edu)
Date: Wed Oct 5 10:26:08 EDT 2011

> I am wondering if there's anything in place already to create an image
> thumbnail. This is basically resizing an image.

In the student graphics libraries (2htdp/image and picturing-programs, which is derived from 2htdp/image), you can use "scale" to scale an image up or down by a specified ratio.  For that matter, if you want to scale the x and y dimensions differently, you can use "scale/xy".  I believe this is a constant-time operation; the number-crunching comes later, when you render it to a bitmap for display on the screen or saving to a PNG file.

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.