ImageUtil Class
ImageUtil provides static methods useful to the manipulation of Image objects. Specifically, it provides methods for setting and getting RGB values, and also provides the ability to create a scaled instance of an existing Image.
ImageUtil Fields
The ImageUtil class defines the following fields:
•public static final int SCALE_AREA - Area scaling method.
•public static final int SCALE_REPLICATE - Replicate scaling method.
•public static final int SCALE_SMOOTH - Smooth scaling method.
ImageUtil Methods
The ImageUtil class defines the following methods:
•public static void getPixels(Image src, int x, int y, int width, int height, int[] rgbData) throws ArrayIndexOutOfBoundsException – Gets RGB pixel data from the specified region of the source image. The data is stored in the provided int array in
•public static void getPixels(Image src,
int[] rgbData) throws ArrayIndexOutOfBoundsException –
Gets RGB pixel data from the entirety of the source image. The data is stored in the provided int array in
•public static void setPixels(javax.microedition.lcdui.Image dest, int x, int y, int width, int height, int[] rgbData) throws ArrayIndexOutOfBoundsException, IllegalArgumentException – Sets RGB pixel data in specified region of the destination image. The data must be stored in the int array in