Why SD 5.5 use Thumbnail Decoding for large image to replace Downsizing in SD 4.0 #3192
KittenYang
started this conversation in
General
Replies: 1 comment 2 replies
-
|
@KittenYang Hi. can you provide your image url, or any demo ? The image bitmap buffer memory size, should be only related to image resolution. For 3960 x 3960, it MUST BE If not, it's a bug, but not designed behavior. (The thumbnail decoding does not take effect at all ?) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that SD 5.5 moved the Downsizing codes to
[SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:bytes];and not used.Instead,SD 5.5.0 use the Thumbnail Decoding https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#thumbnail-decoding-550
So I write a test, both decode a large image, the limited size is 60M which means the output image maximum size is small than (3960, 3960). Here is the result.
SD 4.x downsizing:

SD 5.5 Thumbnail Decoding

Notice the peak memory, the Thumbnail Decoding workaround is way more higher than Downsizing workaround.
So why use Thumbnail Decoding instead of Downsizing.Do I miss some context?
Beta Was this translation helpful? Give feedback.
All reactions