diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/UploadPhotosAsyncTask.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/UploadPhotosAsyncTask.java index cf0587e06f..e552cb1373 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/UploadPhotosAsyncTask.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/UploadPhotosAsyncTask.java @@ -180,7 +180,9 @@ public class UploadPhotosAsyncTask extends AsyncTask { 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();