update commons to 2.36.1

This commit is contained in:
tibbi 2017-11-06 21:09:56 +01:00
parent 283121a046
commit a8f1b88859
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ android {
}
dependencies {
compile 'com.simplemobiletools:commons:2.35.10'
compile 'com.simplemobiletools:commons:2.36.1'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'

View File

@ -516,9 +516,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
bmp.compress(file.getCompressionFormat(), 90, out)
}
private fun saveRotation(input: File, output: File) {
copyFile(input, output)
val exif = ExifInterface(output.absolutePath)
private fun saveRotation(source: File, destination: File) {
copyFile(source, destination)
val exif = ExifInterface(destination.absolutePath)
val orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL)
val orientationDegrees = (degreesForRotation(orientation) + mRotationDegrees) % 360
exif.setAttribute(ExifInterface.TAG_ORIENTATION, rotationFromDegrees(orientationDegrees))