This page describes the simplest operations on images. Use them to build
advanced operations.
Methods
boolean samesize(Image24 im)
returns true if this and the given image have the same size.
int getwidth()
getwidth and getheight give the size of the Image24 in pixels
int getheight()
getwidth and getheight give the size of the Image24 in pixels
void set(int x,int y,int v)
set the pixel at position (x,y) with value v. See the method color for
making a suitable value.
int extget(int x,int y)
get the value of the pixel at (x,y). If x and y lie
outside the image, the closest boundary value is returned.
bgget(int x,int y,int bg)
get the value of the pixel at (x,y). If x and y lie
outside the image, the background value bg is returned.
int get(int x,int y)
get the value of the pixel at (x,y). It is required
that (x,y) lies inside the image. If not, a wrong value
is returned or an ArrayIndexOutOfBoundsException is thrown.
int linget(double x, double y,double[] w,int[] v,int bg)
get a pixel using linear interpolation of the 4 surrounding pixels
w and v must be arrays of length 4. They are given so they can be reused.
bg is the background color that is returned for pixels outside the image.
[click here if you see no menu]