public int getPixel (int x, int y)Added in API level 1Returns the Color at the specified location. Throws an exception if x or y are out of bounds (negative or >= to the width or height respectively). The returned color is a non-premultiplied ARGB value.ParametersxThe x coordinate (0...width-1) of the pixel to returnyThe y coordinate (0...height-1) of the pixel to returnReturns[*]The argb Color at the specified coordinateThrowsIllegalArgumentExceptionif x, y exceed the bitmap's bounds
public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub bitmap.getPixel(event.getX(), event.getY()); return false; }
谢谢帮助!!!!