Hello. I have a grayscale image that i want to process. I take the raster and then i want to scan the pixels and once i find a non-black pixel, i want to make an operetion(which doesn't matter right now). When i have an ARGB image i do this
int[] sample = new int[4];
int[] sample2 = new int[4];
for(int y = centery; y<50; y++)
{
sample2 = raster.getPixel(centerx,y, sample);
if (sample2[0] == 0)
{
planet1 = 1;
}
else
{
planet1 = y;
}
}
What should i do in case of a grayscale image? Thanx a lot in advance.