各位先进好~
我以此方式来进行拍摄获得相片
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
接着来找出照片的中心点
protected void onActivityResult(int requestCode, int resultCode, Intent
intent) {
super.onActivityResult(requestCode, resultCode, intent);
Bitmap picture;
picture = (Bitmap) intent.getExtras().get("data");
cpic = picture.copy(Bitmap.Config.ARGB_8888, true);
int[][] imRed =new int[picture.getWidth()][picture.getHeight()];
int[][] imGreen =new int[picture.getWidth()][picture.getHeight()];
int[][] imBlue =new int[picture.getWidth()][picture.getHeight()];
br=imRed[picture.getWidth()/2][picture.getHeight()/2];
bg=imRed[picture.getWidth()/2][picture.getHeight()/2];
bb=imRed[picture.getWidth()/2][picture.getHeight()/2];
这时候我得到的RGB却不是照片的中间
而是在中间偏左下的位置
请问我那里想错了吗?
谢谢!!!