Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在缓存重新缩放的图像之前,在Universal Image Loader中下载重新缩放位图_Android_Universal Image Loader - Fatal编程技术网

Android 在缓存重新缩放的图像之前,在Universal Image Loader中下载重新缩放位图

Android 在缓存重新缩放的图像之前,在Universal Image Loader中下载重新缩放位图,android,universal-image-loader,Android,Universal Image Loader,我正在使用在ImageView中显示位图。但是当下载位图时,我想重新缩放它,然后重新缩放的位图应该被缓存。。。。我无法确定需要在哪个点进行修改才能达到我的目的。UILDisplayImageOptions有一个imageScaleType参数,该参数采用imageScaleType。请确保在缓存图像之前进行缩放: 因此,在DisplayOptions中设置ImageScaleType,并在缓存中享受缩放的位图 /** * Image will scaled-down exactly to tar

我正在使用在ImageView中显示位图。但是当下载位图时,我想重新缩放它,然后重新缩放的位图应该被缓存。。。。我无法确定需要在哪个点进行修改才能达到我的目的。

UIL
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.
*/