Android: Save Image On Sd Card With Its Original Size
When i capture an image from the camera (from the device home screen) and check the image size on the SD card, it shows between 300-500 Kb. But when i capture an image in my Applic
Solution 1:
You are using the following to compress the bitmap object you receive:
bit.compress(Bitmap.CompressFormat.JPEG, 100, bao);
That is the reason your bitmap is being stored in a compressed format.
Also, you can use bit.getHeight()
and bit.getWidth()
to get the dimensions of your bitmap. You can use bit.getByteCount()
to get the actual size of your bitmap
Solution 2:
Check the answer that is accepted here, hope it may work for you
Solution 3:
Firstly try to find out the size of the picture using the code below
CameramCamera=null;
Camera.ParameterscamParams= mCamera.getParameters();
SizecamSize= camParams.getPictureSize();
If the picture size you get is 5-10 KB, then there is nothing wrong with your code, you may have to re-visit your camera parameters to see what quality you have set.
Post a Comment for "Android: Save Image On Sd Card With Its Original Size"