Created
August 14, 2017 23:40
-
-
Save cjoseanguiano/d39e11f16194da8afe51ff9fb4cab9cb to your computer and use it in GitHub Desktop.
BitmapImageSize.java
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
Bitmap bitmapImage = BitmapFactory.decodeFile(uri.getPath()); | |
int nh = (int) (bitmapImage.getHeight() * (512.0 / bitmapImage.getWidth())); | |
Bitmap scaled = Bitmap.createScaledBitmap(bitmapImage, 512, nh, true); | |
mediaListRowHolder.thumbnail.setImageBitmap(scaled); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment