These pages are auto-generated from self-documenting comments embedded in class files.

For more information on breve and steve, refer to the breve homepage.

Abstract : Image

Class Description:

The Image class provides an interface to work with images. The individual pixels of the image can then be read or changed by the simulation.

Class methods:

Loading and Creating Images

Getting information about the size and format of an image

Getting the value of pixels

Setting the value of pixels


get-alpha-pixel at-x x (int) at-y y (int)

Returns the alpha channel pixel at the image coordinates (x, y). The pixel value is given on a scale from 0.0 to 1.0.


get-blue-pixel at-x x (int) at-y y (int)

Returns the blue pixel at the image coordinates (x, y). The pixel value is given on a scale from 0.0 to 1.0.


get-green-pixel at-x x (int) at-y y (int)

Returns the green pixel at the image coordinates (x, y). The pixel value is given on a scale from 0.0 to 1.0.


get-height

Returns the width of the image.


get-red-pixel at-x x (int) at-y y (int)

Returns the red pixel at the image coordinates (x, y). The pixel value is given on a scale from 0.0 to 1.0.


get-rgb-pixel at-x x (int) at-y y (int)

Returns the red, green and blue components of the pixel at image coordinates (x, y) as a vector.


get-width

Returns the width of the image.


init-with width imageWidth (int) height imageHeight (int)

Creates an empty image buffer with width imageWidth and length imageLength.


load from imageFile (string)

Loads an image from the file imageFile.


set-alpha-pixel to alphaPixel (float) at-x x (int) at-y y (int)

Sets the alpha pixel value at coordinates (x, y) to alphaPixel. alphaPixel should be a value between 0.0 and 1.0.


set-blue-pixel to bluePixel (float) at-x x (int) at-y y (int)

Sets the blue pixel value at coordinates (x, y) to bluePixel. bluePixel should be a value between 0.0 and 1.0.


set-green-pixel to greenPixel (float) at-x x (int) at-y y (int)

Sets the green pixel value at coordinates (x, y) to greenPixel. greenPixel should be a value between 0.0 and 1.0.


set-pixel to pixelVector (vector) at-x x (int) at-y y (int)

Sets the red, green and blue pixel values at image coordinates (x, y) from the values in pixelVector.


set-red-pixel to redPixel (float) at-x x (int) at-y y (int)

Sets the red pixel value at coordinates (x, y) to redPixel. redPixel should be a value between 0.0 and 1.0.


write to imageFile (string)

Write the image to imageFile. The image is written as a PNG file, so imageFile should end with .PNG.


Documentation created Tue May 11 10:28:37 2004