mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
update commons to 3.19.8
This commit is contained in:
parent
04ab018a32
commit
4949744677
4 changed files with 4 additions and 5 deletions
|
@ -47,7 +47,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -275,7 +275,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
} else {
|
} else {
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
.transform(GlideRotateTransformation(context!!, degrees))
|
.transform(GlideRotateTransformation(degrees))
|
||||||
|
|
||||||
Glide.with(this)
|
Glide.with(this)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
|
|
@ -31,7 +31,7 @@ class GlideDecoder : ImageDecoder {
|
||||||
|
|
||||||
val degrees = getRotationDegrees(orientation)
|
val degrees = getRotationDegrees(orientation)
|
||||||
if (degrees != 0) {
|
if (degrees != 0) {
|
||||||
options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation)))
|
options.transform(GlideRotateTransformation(getRotationDegrees(orientation)))
|
||||||
}
|
}
|
||||||
|
|
||||||
val drawable = Glide.with(context)
|
val drawable = Glide.with(context)
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package com.simplemobiletools.gallery.helpers
|
package com.simplemobiletools.gallery.helpers
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Matrix
|
import android.graphics.Matrix
|
||||||
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool
|
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool
|
||||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
|
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
|
||||||
import java.security.MessageDigest
|
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 {
|
override fun transform(pool: BitmapPool, bitmap: Bitmap, outWidth: Int, outHeight: Int): Bitmap {
|
||||||
if (rotateRotationAngle % 360 == 0)
|
if (rotateRotationAngle % 360 == 0)
|
||||||
return bitmap
|
return bitmap
|
||||||
|
|
Loading…
Reference in a new issue