我有一个imageview
android:id="@+id/imgCaptured"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/captured_image" />
我从相机捕获图像,将该图像转换为位图.
Bitmap thumbnail;
thumbnail = MediaStore.Images.Media.getBitmap(getActivity()
.getContentResolver(), imageUri);
当我在上面的imageview中显示它之前得到这个位图的分辨率,比如
Log.i("ImageWidth = " + thumbnail.getWidth(), "ImageHeight = "
+ thumbnail.getHeight());
它归还了我 ImageWidth = 2592 ImageHeight = 1936
在此之后我在上面的imageview中显示了这个位图,imgCaptured.setImageBitmap(thumbnail); 然后我将我的imageview的大小视为
Log.i("ImageView Width = " + imgCaptured.getWidth(),
"ImageView Height = " + imgCaptured.getHeight());
这让我回头 ImageView Width = 480 ImageView Height = 720
现在我的问题是
在我的imageview中显示后,如何获得该位图的大小.我知道这可以通过使用它来完成
image.buildDrawingCache();
Bitmap bmap = image.getDrawingCache();
但这会创建一个大小等于imageview的新位图.
我还想知道,在imageview中显示后,图像会自动调整大小.如果是,那么有没有办法在imageview中显示图像而不调整图像大小.
编辑
实际上我已经拍摄了2592x1936的图像.我在imageView中显示了这个图像,对此图像做了一些其他操作.现在我想以相同的2592x1936分辨率保存此图像.可能吗?
提前致谢.