Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images are decoded without resizing: #335

Open
sunshinelwj opened this issue Nov 27, 2021 · 0 comments
Open

Images are decoded without resizing: #335

sunshinelwj opened this issue Nov 27, 2021 · 0 comments

Comments

@sunshinelwj
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant