kopt: option to invert document in night mode#14954
Conversation
1448c9e to
f2ac4f2
Compare
|
Any thoughts? |
|
Fine with the setting position (it makes the last panel have 5 items, but only when nightmode is enabled, and it's the same for ReaderRolling). |
|
The blitbuffer stuff is fine in principle, but note that k2pdfopt has a -neg option. It might be more efficient to use that instead. |
You said last panel, but this is currently on the contrast panel. Should it be moved to the last one to match "Invert Images"?
That's interesting. The part of k2pdfopt responsible for that seems to be |
KOPTContext controls what we want it to control. ;-) But since it'll ultimately do something very similar it'd probably mostly be keeping things a touch more legible over here. On the flip side, this way you can also apply the same thing to PicDocument. |
Oh, right. |
Yeah, that might be better than messing around with blitters. Although, one benefit of inverting it after is not having to update the cache.
That's definitely a good point. Although it might be more similar to the dewatermark and contrast option in practice, conceptually it is definitely a document option especially since it is dependent on night mode. And ultimately the consistency/symmetry with creopt is probably preferable. |
52bd00c to
3ba140f
Compare
) Due to changes to renderOptimizedPage(...) made by #15067, which was merged after #14954 was made, a regression was introduced that causes instability and even crashes on mobile devices and e-readers when Invert Document is enabled along with Reflow or Auto Straighten. This PR fixes the regression and simplifies the drawContextPage(...) method.
…eader#15123) Due to changes to renderOptimizedPage(...) made by koreader#15067, which was merged after koreader#14954 was made, a regression was introduced that causes instability and even crashes on mobile devices and e-readers when Invert Document is enabled along with Reflow or Auto Straighten. This PR fixes the regression and simplifies the drawContextPage(...) method.
…eader#15123) Due to changes to renderOptimizedPage(...) made by koreader#15067, which was merged after koreader#14954 was made, a regression was introduced that causes instability and even crashes on mobile devices and e-readers when Invert Document is enabled along with Reflow or Auto Straighten. This PR fixes the regression and simplifies the drawContextPage(...) method.
Adds a document option for CBZs/PDFs to invert the document in night mode. Uses invertblitFrom().
Resolves #9899.
This change is