指定したサイズの画像をSDカードの希望の場所に保存しようとしています。intent.putExtraを使用して、デフォルトのカメラアプリケーションを介して画像を撮影しています。
ここにコードがあります
public void onClick(View v) {
//Setting up the URI for the desired location
imageFile = "bmp"+v.getId()+".png";
File f = new File (folder,imageFile);
imageUri = Uri.fromFile(f);
//Setting the desired size parameters
private Camera mCamera;
Camera.Parameters parameters = mCamera.getParameters();
parameters.setPreviewSize(width, height);
mCamera.setParameters(parameters);
//Passing intent.PutExtras to defaul camera activity
Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(i,CAMERA_PIC_REQUEST);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK){
return;
}
画像撮影後、カメラ起動力が閉じます。この方法で、デフォルトのカメラアクティビティによって撮影された画像のサイズを変更することは可能ですか?
または別のカメラアプリケーションが必要ですか?