update commons to 3.19.8

This commit is contained in:
tibbi 2018-04-22 23:35:08 +02:00
parent 04ab018a32
commit 4949744677
4 changed files with 4 additions and 5 deletions

View file

@ -47,7 +47,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.19.7'
implementation 'com.simplemobiletools:commons:3.19.8'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -275,7 +275,7 @@ class PhotoFragment : ViewPagerFragment() {
} else {
val options = RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.NONE)
.transform(GlideRotateTransformation(context!!, degrees))
.transform(GlideRotateTransformation(degrees))
Glide.with(this)
.asBitmap()

View file

@ -31,7 +31,7 @@ class GlideDecoder : ImageDecoder {
val degrees = getRotationDegrees(orientation)
if (degrees != 0) {
options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation)))
options.transform(GlideRotateTransformation(getRotationDegrees(orientation)))
}
val drawable = Glide.with(context)

View file

@ -1,13 +1,12 @@
package com.simplemobiletools.gallery.helpers
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Matrix
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
import java.security.MessageDigest
class GlideRotateTransformation(context: Context, val rotateRotationAngle: Int) : BitmapTransformation(context) {
class GlideRotateTransformation(val rotateRotationAngle: Int) : BitmapTransformation() {
override fun transform(pool: BitmapPool, bitmap: Bitmap, outWidth: Int, outHeight: Int): Bitmap {
if (rotateRotationAngle % 360 == 0)
return bitmap