I want to change an image's EXIF info (its orientation to ExifInterface.ORIENTATION_ROTATE_270). I am using this code:
val inputStream: InputStream? = mActivity.contentResolver.openInputStream(imageURI)
val exif = ExifInterface(inputStream!!)
exif.setAttribute(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_ROTATE_270.toString())
exif.saveAttributes()
Unfortunately, this code has no effect. Why?