File file = new File("/sdcard/image.jpg");
try {
captureBmp = Images.Media.getBitmap(getContentResolver(),
Uri.fromFile(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
int width = captureBmp.getWidth();
int height = captureBmp.getHeight();
int [][] gray = new int [width][height];
Bitmap tmpBmp = captureBmp.copy(Bitmap.Config.ARGB_8888, true);
제가 사진의 RGB 분석하는 어플을 만들고 있는데요
위에 코드를 보면 image라는 jpg파일만 분석할 수 있게 되어 있는데
image 이름의 파일말고 갤러리에 있는 사진을 불러와서 그 불러 온 사진을
분석하게 끔 할 수는 없을까요 ㅠㅠ
Intent i2 = new Intent(Intent.ACTION_PICK);
i2.setType(Images.Media.CONTENT_TYPE);
i2.setData(Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i2, REQ_CODE_PICK_PICTURE);
그래서 제가 일단 이런 식으로 사진목록 불러오는 코드는 추가 시켰는데 그 다음은 어케 해야될 지 모르것네요 ㅠ
일단 저 맨 위에 있는 file 소스 대신에 다른걸 적어야 할 것 같은데 으;;
아니면 불러온 사진을 image.jpg 로 저장하게 하는 소스가 있어도 될텐데 말이죠 흑