Reference for Image-based Procedures


Basic Image Operations

(image-new width height)
DrFu procedure. Create a new image of specified width and height.
(image-load filename)
DrFu procedure. Load an image from a file. The name of the file is a string (and, unless a named value, typically surrounded by quotation marks).
(image-show image)
DrFu procedure. Opens a new window with the image.
(image-height image)
DrFu procedure. Determine the height of the given image
(image-width image)
DrFu procedure. Determine the width of the given image.

Pixel-Based Operations

(image-get-pixel image column row)
DrFu procedure. Get the pixel at the specified posi tion in the image.
(image-set-pixel! image column row rgb-color)
DrFu procedure. Set the pixel at the specified position to the new color.
(image-transform-pixel! image column row func)
DrFu procedure. Modify the pixel at (col,row) in image by applying func to its old color and setting that pixel to the resulting color.

Higher-Order Procedures

<xi:include></xi:include>
(image-transform! image fun)
DrFu procedure. Transform image in place by setting each pixel to the result of applying fun to that current pixel color.
(image-compute-pixels! image first-col first-row last-col last-row function)
DrFu procedure. Create a portion of an image by setting each pixel in the specified region to the result of applying function to the position of the pixel. function must be a function from position to rgb-color. Warning! The current version is buggy, and may affect other pixels.

Jerod Weinman