I have a bitmap encoded at PNG format. How to certainly determine where is black where is white?
final int[] p = new int[1];
int iter = 0;
for (int i = 0; i < image.getWidth(); i++) {
for (int j = 0; j < image.getHeight(); i++) {
pixels[iter] = image.getData().getPixel(i, j, p)[0];
iter++;
}
}
return me always 1 per pixel.
red, green and blue will be the RGB values of pixel at x=100 and y=40