The problem I have is that when you take a photo from my application and I proceed to save it, it is stored with a frame on the sides.
I wanted to know how I can delete this framework.
I leave my code
private void openCameraIntent() {
Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (pictureIntent.resolveActivity(getPackageManager()) != null) {
File photoFile = null;
try {
photoFile = createImageFile();
} catch (IOException e) {
e.printStackTrace();
return;
}
Uri photoUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", photoFile);
pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
ivimagen.setImageURI(Uri.parse(imageFilePath));
ivimagen.buildDrawingCache();
startActivityForResult(pictureIntent, 1);
}
}
private File createImageFile() throws IOException {
// Create an image file name
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
File image = File.createTempFile(
imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
// Save a file: path for use with ACTION_VIEW intents
imageFilePath = image.getAbsolutePath();
return image;
}