Get the color of a specific pixel Java Android example

             ImputStream      is = this.getResources().openRawResource(R.drawable.colors);
             Bitmap    mBitmap2 = BitmapFactory.decodeStream(is);
         int  w = mBitmap2.getWidth();
         int  h = mBitmap2.getHeight();
//  int x , y have to be smaller as w , h 
         int _color =  mBitmap2.getPixel(x, y);
This entry was posted in Android Examples Code, Bitmap, drawing and tagged , , , . Bookmark the permalink.

Comments are closed.