EhViewer icon indicating copy to clipboard operation
EhViewer copied to clipboard

(Issue) Reader can't render big images (tested on 28mb manhwa image)

Open AniLabXTeam opened this issue 6 years ago • 6 comments

I'm found that reader can't render big images. In code i changed link to gallery images to custom one - http://img4.mangachan.me/manga/-9new/d/1547168693_demon-kings-troubles_v1_ch2/002.png. It's mahnwa scan with size ~28mb. Reader downloads image normally, but decode/render phase is "stuck" and i'm getting infinite loading progess. Can it be fixed?

App version: tested on 1.0.30 and 1.4.0 - same result Phone: Redmi 4X 2gb ram. On Redmi Note 4 3gb ram same issue

AniLabXTeam avatar Jan 27 '19 09:01 AniLabXTeam

But this project https://github.com/seven332/android-gallery can load and decode/render this image correctly.

AniLabXTeam avatar Jan 27 '19 09:01 AniLabXTeam

EhView uses GLGallery to render images, not android-gallery. That‘s a drawback of GLGallery.

seven332 avatar Jan 27 '19 15:01 seven332

EhView uses GLGallery to render images, not android-gallery. That‘s a drawback of GLGallery.

So, using GLGallery i can't render such big images? And i don't see any messages from app that it can't use this img. Is there any way to check status of decode/render and show error in ui/logcat in that way?

AniLabXTeam avatar Jan 27 '19 15:01 AniLabXTeam

It's possible to fix it. But it takes time.

seven332 avatar Jan 27 '19 16:01 seven332

It's possible to fix it. But it takes time.

Thank you! I will wait for fix.

AniLabXTeam avatar Jan 27 '19 16:01 AniLabXTeam

@seven332 I'm investigated this issue and found that this error is causing because of trying to save into LRUCache really big amount of decoded image data. For example, in my device, LRUCache was set to max 100Mb, but ~10Mb Manhwa scan decodes into ~136mb of native data. Reader trying to decode 3 scans at the same time, so LRUCache always trim already decoded images (all of them).

Disabling trim fixes render problem, but that's not "normal" fix (because of potential OOM). Maybe Image.decode() or GLView can do some sort of subsampling?

AniLabXTeam avatar May 14 '19 14:05 AniLabXTeam