mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 18:19:38 +00:00
@@ -15,6 +15,7 @@ import android.support.annotation.WorkerThread;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy;
|
||||
|
||||
import org.thoughtcrime.securesms.mms.GlideApp;
|
||||
@@ -108,22 +109,6 @@ public class BitmapUtil {
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
public static <T> Bitmap createScaledBitmap(Context context, T model, float scale)
|
||||
throws BitmapDecodingException
|
||||
{
|
||||
try {
|
||||
return GlideApp.with(context.getApplicationContext())
|
||||
.asBitmap()
|
||||
.load(model)
|
||||
.sizeMultiplier(scale)
|
||||
.submit()
|
||||
.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new BitmapDecodingException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static BitmapFactory.Options getImageDimensions(InputStream inputStream)
|
||||
throws BitmapDecodingException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user