[racket] Thumbnailing

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Oct 6 08:31:39 EDT 2011

On Thu, Oct 6, 2011 at 8:16 AM, Paulo J. Matos <paulo at matos-sorge.com> wrote:
> On 05/10/11 15:26, Stephen Bloch wrote:
>>> 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.
> Thanks, I can't seem find a way to open image files (jpeg, png, bmp, etc).
> Is there anything like that in Racket currently? Or do we need ffi to
> libjpeg, libpng, etc.?

See the various options to `load-bitmap' here:


sam th
samth at ccs.neu.edu

Posted on the users mailing list.