rotate images based on exif information

Closes #1847
This commit is contained in:
agrajaghh
2014-08-18 14:45:31 +02:00
committed by Jake McGinty
parent d7de5415b5
commit cef203f261
6 changed files with 241 additions and 33 deletions

View File

@@ -510,14 +510,12 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity {
@Override
protected Bitmap doInBackground(Void... voids) {
if (avatarUri != null) {
InputStream inputStream;
try {
inputStream = getApplicationContext().getContentResolver().openInputStream(avatarUri);
avatarBmp = BitmapUtil.getScaledCircleCroppedBitmap(getApplicationContext(), avatarUri, AVATAR_SIZE);
} catch (FileNotFoundException e) {
Log.w(TAG, e);
return null;
}
avatarBmp = BitmapUtil.getScaledCircleCroppedBitmap(BitmapFactory.decodeStream(inputStream), AVATAR_SIZE);
}
return avatarBmp;
}