Sample photos before load
This commit is contained in:
parent
2bad63f988
commit
0ebaff76e7
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