I have similar kind of problem of exif data
private void removeThumbnails(ContentResolver contentResolver, long photoId) {
try {
Cursor thumbnails = contentResolver.query(
MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, null, MediaStore.Images.Thumbnails.IMAGE_ID
+ "=?", new String[]{String.valueOf(photoId)}, null);
if (thumbnails != null) {
for (thumbnails.moveToFirst(); !thumbnails.isAfterLast() && !thumbnails.isBeforeFirst(); thumbnails.moveToNext()) {
long thumbnailId = thumbnails.getLong(thumbnails.getColumnIndex(MediaStore.Images.Thumbnails._ID));
String path = thumbnails.getString(thumbnails.getColumnIndex(MediaStore.Images.Thumbnails.DATA));
File file = new File(path);
if (file.delete()) {
contentResolver.delete(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, MediaStore.Images.Thumbnails._ID + "=?",
new String[]{String.valueOf(thumbnailId)});
}
}
thumbnails.close();
}
} catch (Exception e) {
}
}
So I have removed the thumbnail of it first then done the operation on the image
So u can try removing the thumbnail and try to crop it after