net.sourceforge.jiu.data

Interface GrayImage

Known Subinterfaces:
BilevelImage, Gray16Image, Gray8Image, GrayIntegerImage
Known Implementing Classes:
MemoryBilevelImage, MemoryGray16Image, MemoryGray8Image

public interface GrayImage

An interface for grayscale images. Grayscale images have only one channel. Each sample is a shade of gray, an intensity value between black (zero) and white (maximum value). Black and white photos are really grayscale photos. For images that only use black and white, see BilevelImage.
Author:
Marco Schmidt
Since:
0.8.0

Method Summary

boolean
isBlack(int x, int y)
Returns if the pixel specified by the location in the arguments is black.
boolean
isWhite(int x, int y)
Returns if the pixel specified by the location in the arguments is white.
void
putBlack(int x, int y)
Sets a pixel to black (minimum intensity value).
void
putWhite(int x, int y)
Sets a pixel to white (maximum intensity value).

Method Details

isBlack

public boolean isBlack(int x,
                       int y)
Returns if the pixel specified by the location in the arguments is black.
Parameters:
x - the horizontal location of the pixel
y - the vertical location of the pixel

isWhite

public boolean isWhite(int x,
                       int y)
Returns if the pixel specified by the location in the arguments is white.
Parameters:
x - the horizontal location of the pixel
y - the vertical location of the pixel

putBlack

public void putBlack(int x,
                     int y)
Sets a pixel to black (minimum intensity value).
Parameters:
x - horizontal position of the pixel's location
y - vertical position of the pixel's location

putWhite

public void putWhite(int x,
                     int y)
Sets a pixel to white (maximum intensity value).
Parameters:
x - horizontal position of the pixel's location
y - vertical position of the pixel's location