View Single Post
Old 09-12-2018, 08:47 PM   #60
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The easiest way to handle images in nightmode is unfortunately on the renderer's side: by rendering images inverted, so that the nightmode's invert will then "fix" them.

Doing it otherwise is highly impractical, since update regions can only be rectangles, so splitting a screen region in as many rectangles as necessary to "excise" a single image rectangle in the middle of the screen sounds like a terrible idea, and that already implies being able to exactly tell where the image even *is* on screen... (And if you want to go the extra mile and do the processing yourself so that you only end up with a single eInk update and not one per split rectangle, that's even more fun for you).


(And, no, before anyone asks, we don't do it "right" in KOReader either. I hate nightmode with a fiery passion, which probably doesn't help [My rationale being it only makes sense on OLED screens]. But it's technically doable in KOReader: make the nightmode status accessible where relevant, so that image rendering can invert stuff, either at rendering time, or at blit time if the rendering backend doesn't support that (mupdf might, I haven't checked), and enforce a slightly less terrible waveform update mode when in nightmode, because anything else than GC16 will probably look god-damn awful. If latency is favorable, I'd even go so far as dimming the front-light during flashing updates so as not to burn retinas off. I think the Oasis 2 does something of the sort, besides having a proper invert-optimized waveform mode).

TL;DR: No, definitely not trivial to do right. But not exceedingly hard, either, unless you want a shiny waveform mode like lab126 .

Last edited by NiLuJe; 09-12-2018 at 08:58 PM.
NiLuJe is offline   Reply With Quote