testButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v)
{
imageView.setImageBitmap(Bitmap);
imageView.buildDrawingCache();
Bitmap bm =imageView.getDrawingCache();
Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
File imagesFolder = new File(Environment.getExternalStorageDirectory(), "Punch");
imagesFolder.mkdirs();
String fileName = "image" + ".jpg";
File output = new File(imagesFolder, fileName);
Uri uriSavedImage = Uri.fromFile(output);
imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
OutputStream fos = null;
try {
fos = getContentResolver().openOutputStream(uriSavedImage);
bm.compress(CompressFormat.JPEG, 100, fos);
fos.flush();
fos.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
finally
{}
}
});
首先我从SD卡中检索到一张分辨率为(640 x 480)的图片并将其放入图像视图中。然后我将该图像再次保存到SD卡中。但是保存的图像分辨率为(188x113)。请问有什么建议可以使保存的图像具有相同的分辨率?任何建议都将不胜感激。