Sample photos before load
This commit is contained in:
parent
0f9673cd2e
commit
0b92765f87
1 changed files with 3 additions and 1 deletions
|
@ -180,7 +180,9 @@ public class UploadPhotosAsyncTask extends AsyncTask<Void, Integer, Void> {
|
|||
|
||||
private byte[] compressImageToJpeg(InputStream image) {
|
||||
BufferedInputStream bufferedInputStream = new BufferedInputStream(image);
|
||||
Bitmap bmp = BitmapFactory.decodeStream(bufferedInputStream);
|
||||
BitmapFactory.Options opts = new BitmapFactory.Options();
|
||||
opts.inSampleSize = 4;
|
||||
Bitmap bmp = BitmapFactory.decodeStream(bufferedInputStream, null, opts);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
int h = bmp.getHeight();
|
||||
int w = bmp.getWidth();
|
||||
|
|
Loading…
Reference in a new issue