#1228 now always converting to JPG.

This commit is contained in:
Angelo Fuchs
2020-06-05 15:51:32 +02:00
parent 3a0cfcad4d
commit 5c80f8aeeb
@@ -195,10 +195,10 @@ public class CreateProfileActivity extends BaseActionBarActivity {
Uri imageUri = Crop.getOutput(data);
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imageUri);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
return stream.toByteArray();
} catch (Exception any) {
Log.e(TAG, "could not send raw PNG to core. Using scaled JPG.", any);
Log.e(TAG, "could not send raw JPG to core. Using scaled JPG.", any);
}
BitmapUtil.ScaleResult result =
BitmapUtil.createScaledBytes(CreateProfileActivity.this, Crop.getOutput(data), new ProfileMediaConstraints());