Created
August 5, 2017 18:23
-
-
Save Pethaf/06c7379562d4ae99330d4d9ac0e9e537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BitmapFactory.Options options = new BitmapFactory.Options(); | |
options.inJustDecodeBounds = true; | |
Bitmap bitmap = BitmapFactory.decodeFile(files[0], options); | |
if (options.outWidth != -1 && options.outHeight != -1) { | |
options.inPreferredConfig = Bitmap.Config.ARGB_8888; | |
options.inJustDecodeBounds = false; | |
bitmap = BitmapFactory.decodeFile(files[0],options); | |
originalImage.setImageBitmap(bitmap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment