Java Utililty Methods Pixel Convert To

List of utility methods to do Pixel Convert To

Description

The list of methods to do Pixel Convert To are organized into topic(s).

Method

voidpixelToRGB(int pixel, int[] prgb)
pixel To RGB
prgb[0] = (pixel & 0xff0000) >> 16;
prgb[1] = (pixel & 0xff00) >> 8;
prgb[2] = pixel & 0xff;
int[]pixelXYToTileXY(int pixelX, int pixelY)
Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel.
int tileX, tileY;
tileX = pixelX / 256;
tileY = pixelY / 256;
return new int[] { tileX, tileY };