From 900a2d00836bf3abc923f1de0bf46d757300a3a4 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 4 Aug 2023 14:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJuMethod.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuMethod.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SrcJuMethod.js b/SrcJuMethod.js index 25588a73..b1bbda10 100644 --- a/SrcJuMethod.js +++ b/SrcJuMethod.js @@ -164,7 +164,10 @@ function imageCompress(imgurl,fileid) { let newpath = "/storage/emulated/0/Android/data/com.example.hikerview/files/Documents/_cache/"+(fileid||"")+"_"+getName(imgurl); log(newpath); //compress(f, 2, newpath); - compress(f, 8, "/storage/emulated/0/Android/data/com.example.hikerview/files/Documents/_cache/1.jpg"); + let f = fetch(imgurl, { + inputStream: true + }); + compress(f, 3, "/storage/emulated/0/Android/data/com.example.hikerview/files/Documents/_cache/1.jpg"); //return "file://" + newpath; return "file:///storage/emulated/0/Android/data/com.example.hikerview/files/Documents/_cache/1.jpg"; }