Android 在缓存重新缩放的图像之前,在Universal Image Loader中下载重新缩放位图
我正在使用在ImageView中显示位图。但是当下载位图时,我想重新缩放它,然后重新缩放的位图应该被缓存。。。。我无法确定需要在哪个点进行修改才能达到我的目的。UILAndroid 在缓存重新缩放的图像之前,在Universal Image Loader中下载重新缩放位图,android,universal-image-loader,Android,Universal Image Loader,我正在使用在ImageView中显示位图。但是当下载位图时,我想重新缩放它,然后重新缩放的位图应该被缓存。。。。我无法确定需要在哪个点进行修改才能达到我的目的。UILDisplayImageOptions有一个imageScaleType参数,该参数采用imageScaleType。请确保在缓存图像之前进行缩放: 因此,在DisplayOptions中设置ImageScaleType,并在缓存中享受缩放的位图 /** * Image will scaled-down exactly to tar
DisplayImageOptions
有一个imageScaleType
参数,该参数采用imageScaleType
。请确保在缓存图像之前进行缩放:
因此,在DisplayOptions中设置ImageScaleType,并在缓存中享受缩放的位图
/**
* Image will scaled-down exactly to target size (scaled width or height or both
* will be equal to target size; depends on ImageView's scale type). Use it if
* memory economy is critically important.
* Note: If original image size is smaller than target size then original image
* won't be scaled.
*
* NOTE: For creating result Bitmap (of exact size) additional Bitmap will be
* created with Bitmap#createBitmap(...)
* Cons: Saves memory by keeping smaller Bitmap in memory cache (comparing with
* IN_SAMPLE... scale types)
* Pros: Requires more memory in one time for creation of result Bitmap.
*/