diff --git a/SrcJuMethod.js b/SrcJuMethod.js index c1adec89..8f467d13 100644 --- a/SrcJuMethod.js +++ b/SrcJuMethod.js @@ -103,16 +103,22 @@ function imageCompress(imgurl,fileid) { const BitmapFactory = android.graphics.BitmapFactory; const FileOutputStream = java.io.FileOutputStream; let options = new BitmapFactory.Options(); - options.inSampleSize = 3; + options.inSampleSize = 2; options.inPurgeable = true; + let options2 = new BitmapFactory.Options(); + options2.inJustDecodeBounds = true; + options2.inPurgeable = true; let bitmap; + let bitmap2; if (topath && typeof path === "object" && path.getClass) { bitmap = BitmapFactory.decodeStream(path, null, options); + bitmap2 = BitmapFactory.decodeStream(path, null, options2); closeMe(path); } else { bitmap = BitmapFactory.decodeFile(path, options); topath = topath || path; } + log(options2); let os = new FileOutputStream(topath); let s = false; try {