Tencent / LKImageKit

A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Other
2.08k stars 287 forks source link

decoding and caching should happen at image creation time? #2

Closed willice9527 closed 6 years ago

willice9527 commented 6 years ago

首先致敬诸位大神的开源精神 LKImageSystemDecoder里有些疑惑之处,还请指教: CFDictionarySetValue(option, kCGImageSourceShouldCacheImmediately, kCFBooleanFalse); kCGImageSourceShouldCacheImmediately 看了下默认即为false,而且不少优化的教程都表示先decode and caching 会减轻图片实际用于显示时cpu的解码压力。 不知此处有何其它考虑?

kelingjie1 commented 6 years ago

if (request.processorList.count == 0) { CFDictionarySetValue(option, kCGImageSourceShouldCacheImmediately, kCFBooleanFalse); } 这里确实写错了,应该为true。这里的逻辑是如果后续不进行图片处理则此处解码,否则此处不解码 谢谢提醒,已经修改 it should be true for no image processor。Thank you。