Any algorithm to check every pixels that contain specific color?. in Android :)
Now I have 2 dimension array that collects all color's pixel and I have 1 dimension array that collects a specific color that every pixel need to check with this array. But how to check this 2 arrays
first array is array_A = new String[bitmap.getWidth()][bitmap.getHeight()];Another is final String[] array_B = { "ffcc33","ffcc00",....} so how can I check this 2 arrays :)) Thank开发者_如何学JAVAs in Advance
Hope that snippets would help you. Also, you can use pixel[] = new int [width*height]
to get pixel from image.
for(int w= 0; w < bitmap.getwidth(); w++)
{
for(int h = 0 ; h < bitmap,getheight() ; h++ )
{
int c = bitmap.getPixel(w, h);
Log.i("Pixels", h+"X"+w);
}
}
精彩评论