问题描述
在 ALAsset
中快速方便地查看缩略图的方法在问题 - 请参阅调整为返回过滤后的缩略图?
PS我知道可以通过 ALAssetRepresentation
的 fullScreenImage
方法获得过滤的图像,但是它太慢了,可能导致
缩略图是缩小版的图片,用于帮助识别和组织它们,提供服务图像作为正常文本索引的相同角色对词。因此,通常不会应用所有的过滤器或图片效果由于缩小的概念。
要获得ALAsset与应用过滤器或图片效果是 fullResolutionImage
。
如果你在主线程上使用UI更新或使用延迟加载概念,它不会导致任何缓慢。 / p>
如果你保留ALAsset url而不是存储 fullResolutionImage
,它不会导致任何内存压力。 / p>
A prompt and convenient way of gererating thumbnails from an ALAsset
is described in the answer to question "Generating custom thumbnail from ALAssetRepresentation" — see a blog post of the author.
The only issue I have with this method is that it completely ignores all the filters or red-eye removal effects applied to an image (say one taken with stock iOS 7 Photo app + any filter in 'square' mode).
How should the code be adjusted to return 'filtered' thumbnails?
P.S. I know I can get filtered image through fullScreenImage
method of ALAssetRepresentation
, but it's way too slow and could cause 'Terminated due to Memory Pressure' error.
Thumbnails are reduced-size versions of pictures, used to help in recognizing and organizing them, serving the same role for images as a normal text index does for words. So it usually doesn't apply all the filters or picture effects due to reduced-size concept.
To get ALAsset with applied filter or picture effects is fullResolutionImage
.
It doesn't cause any slow, if you are doing the UI updates on main thread or using Lazy loading concepts.
It doesn't cause any Memory Pressure, if you are keeping the ALAsset url's instead of storing the fullResolutionImage
.
这篇关于快速的方式从ALAsset获取缩略图与过滤应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!