Good morning/afternoon
I am making the call to the camera using this code
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri output = Uri.fromFile(new File(name));
intent.putExtra(MediaStore.EXTRA_OUTPUT, output);
startActivityForResult(intent, TAKE_PICTURE);
shows the camera, the photo is taken. and in the onActivityResult
new MediaScannerConnectionClient() {
private MediaScannerConnection msc = null; {
msc = new MediaScannerConnection(getApplicationContext(), this); msc.connect();
}
public void onMediaScannerConnected() {
msc.scanFile(name, null);
}
public void onScanCompleted(String path, Uri uri) {
msc.disconnect();
}
};
the result of the photo is of great weight (mb) and what I am looking for is to reduce said size but avoiding the loss of quality.
well I answer myself... maybe it's not the best solution but there you go. it works for me.
actually I didn't find a way for the camera to always take the photos with the minimum quality and that it is acceptable (without losing sharpness)
what should be done is . after to see recorded the image . You must make a copy of it but doing a compress and save it with the same name. for him to replace it.
I hope it helps you.. if it helped me.