src/jpm/dg/Util.java
/**
	 * Creates a Bitmap from a set of pixel intensities of specified width and
	 * height.
	 * 
	 * @param index
	 *            Index to begin reading pixels.
	 * @param width
	 * @param height
	 * @param target
	 *            Target Bitmap object.
	 * @param pixelData
	 * @return
	 */
Creates a Bitmap from a set of pixel intensities of specified width and
height.

@param index
Index to begin reading pixels.
Creates a Bitmap from a set of pixel intensities of specified width and height . @param index Index to begin reading pixels .
public static Bitmap createBitmap(int index, int width, int height,
			Bitmap target, int[] pixelData) {
		for (int y = 0; y < height; y++) {
			for (int x = 0; x < width; x++) {
				target.setPixel(x, y, Color
						.argb(0xFF, pixelData[index] >> 16 & 0xFF,
								pixelData[index] >> 8 & 0xFF,
								pixelData[index++] & 0xFF));
			}
		}
		pixelData = null;
		return target;
	}
public static Bitmap createBitmap ( int index , int width , int height , Bitmap target , int [ ] pixelData ) { for ( int y = 0 ; y < height ; y ++ ) { for ( int x = 0 ; x < width ; x ++ ) { target . setPixel ( x , y , Color . argb ( 0xFF , pixelData [ index ] >> 16 & 0xFF , pixelData [ index ] >> 8 & 0xFF , pixelData [ index ++ ] & 0xFF ) ) ; } } pixelData = null ; return target ; }
Creates a Bitmap from a set of pixel intensities of specified width and
 height.
Creates a Bitmap from a set of pixel intensities of specified width and height .