Skip to content Skip to sidebar Skip to footer

How Can I Save Output Image From Camera Directly To File Without Compression?

After compressing the file and then texting it, it recompresses again and is very choppy I use Intent to bring up the camera. I get the result and bring up Intent to send as text.

Solution 1:

To save an image directly without compressing use AndroidBmpUtil:

new AndroidBmpUtil().save(source, file);

Solution 2:

Instead of

source.compress(Bitmap.CompressFormat.JPEG, 90, outStream);

use

source.compress(Bitmap.CompressFormat.PNG, 100, outStream);

JPEG is a lossy format hence the choppy result.

Post a Comment for "How Can I Save Output Image From Camera Directly To File Without Compression?"