Currently I am using the compress method to save an image taken with the camera hardware on the android phone to the SD card.
try {
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 10;
Bitmap myImage = BitmapFactory.decodeByteArray(imageData, 0,
imageData.length,options);
fileOutputStream = new FileOutputStream(
sdImageMainDirectory.toString() +"/"+fileName+".png");
BufferedOutputStream bos = new BufferedOutputStream(
fileOutputStream);
myImage.compress(CompressFormat.PNG, 100, bos);
bos.flush();
bos.close();
Now this works perfectly fine, however, the quality of image it saves hardly makes it worth taking the picture in the first place. I’m looking for a better way to save the picture at a higher quality.
here is your loss of quality: This will create an image of 1/10 in
heigthandwidthFrom the doc: