Android的:COM preSS图像(PNG,JPG),而不完全加载它们 [英] Android : Compress images (PNG-JPG) without fully load them
本文介绍了Android的:COM preSS图像(PNG,JPG),而不完全加载它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在寻找比能允许我对COM preSS图像文件的库。
I'm searching for a library than can permit me to compress images file.
我试图用Bitmap类,它工作正常。但我认为这不是一个真正有效的选择。
I tried to use Bitmap class, it works fine. But I think it's not a really efficiently alternative.
如果你能帮助我,非常感谢。
If you can help me, thanks a lot.
推荐答案
您可以通过应用这样的选择COM preSS图片
you can compress image by applying option like this
Options options = new Options();
options.inSampleSize = 2;
options.inPurgeable = true;
options.inScaled= true;
Bitmap dummyBitmap = BitmapFactory.decodeFile(imageBitmapFilePath.get(position).getAbsolutePath(), options);
imageView.setImageBitmap(dummyBitmap);
这篇关于Android的:COM preSS图像(PNG,JPG),而不完全加载它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文