SufficientlySecure/document-viewer

Images are decoded without resizing:

Opened this issue · 0 comments

When loading an image, Google suggests us to resize the image before decoding them, so as to save memory resource
https://developer.android.com/topic/performance/graphics/load-bitmap.html

I noticed that in the following code of Document Viewer, image resizing is correctly applied:
org.ebookdroid.ui.opds.adapters.LoadThumbnailTask.java loadBookThumbnail() (line number:80)
https://github.com/SufficientlySecure/document-viewer/blob/master/document-viewer/src/main/java/org/ebookdroid/ui/opds/adapters/LoadThumbnailTask.java#L80

However, in the code below, images are decoded directly without resizing:
org.ebookdroid.common.cache.ThumbnailFile.java load() (line number: 96)
https://github.com/SufficientlySecure/document-viewer/blob/master/document-viewer/src/main/java/org/ebookdroid/common/cache/ThumbnailFile.java#L96

I am curious about the latter case. Why this method does not resize images? For the images to be displayed, in many cases, they are larger than required.

Thanks.