I have an image
<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" />
I capture a camera image by converting this image to a bitmap.
Bitmap thumbnail; thumbnail = MediaStore.Images.Media.getBitmap(getActivity() .getContentResolver(), imageUri);
when I get the resolution of this bitmap before displaying it in my image above, for example
Log.i("ImageWidth = " + thumbnail.getWidth(), "ImageHeight = " + thumbnail.getHeight());
his return to me ImageWidth = 2592 ImageHeight = 1936
after that I displayed this bitmap in my image above as imgCaptured.setImageBitmap(thumbnail); then I put the size of my image as
Log.i("ImageView Width = " + imgCaptured.getWidth(), "ImageView Height = " + imgCaptured.getHeight());
this returned me ImageView Width = 480 ImageView Height = 720
now my question is what
How can I get the size of this bitmap after displaying it in my image view. I know that this can be done using this
image.buildDrawingCache(); Bitmap bmap = image.getDrawingCache();
but this will create a new raster size equal to the size of the image.
I also want to know that whether the image changed automatically after it was displayed in the image view. if so, is there a way to show the image in image view without resizing the image.
Edit
In fact, I captured a 2592x1936 image. I displayed this image in my View image, did some other operations on this image. Now I want to save this image with the same resolution 2592x1936. is it possible?
Thanks in advance.
source share