0
因此,我已將我的圖像成功傳遞給URI ...但我不知道如何在保持分辨率的同時將其保存或轉換爲位圖。有什麼建議麼?謝謝。在保持分辨率的同時保存URI圖像或轉換爲位圖
photoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// CALL THE PICTURE (this works)
File t = new File (STORAGE_PATH + "savedAndroid.jpg");
mURI = Uri.fromFile(t);
i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mURI);
startActivityForResult(i,0); //0 is default camera
}
});
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
imageView.setImageURI(mURI); //this seems to work...by itself
//save the image or convert it to a bitmap to use with tesseract...
}