我碰到过,但不确定每一行代码的实际效果。我希望我能启发每行代码的含义。
URL url = new URL(urlPath);
stream = url.openConnection().getInputStream();
Bitmap image = BitmapFactory.decodeStream(stream);
fos = new FileOutputStream(output.getPath());
image.compress(Bitmap.CompressFormat.JPEG, 5, fos);
谢谢!
因此,这些代码行的目的是从URL压缩图像。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句