Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Toggle Bitmap Color Inversion [See Pre-Release]

Toggle Bitmap Color Inversion.
I love how bitmap colors are inverted but, when viewing a person’s face,
I want to see it normally ( sans inversion ).
I’d like to hit an icon|key to toggle the inversion.

Thanks for the suggestion. This is tracked with

1 Like

Thank you KJK, you’re lucky to have control of such a fine app.

I don’t know whether it’s a muPDF or Sumatra issue, but AFAIK currently a PDF’s page is rendered as a bitmap and then its colors are flipped if -invert-colors is used. This has the unfortunate side-effect of affecting images as well as text. People have been complaining about this for a long time (see here for example), especially since Adobe Reader doesn’t seem to be similarly affected. Wonder how Adobe does it so Sumatra can replicate it too?

Our implementation is very simple: after rendering the whole page (text and images and vector graphics), we flip all pixels.

I imagine it would be possible (but more complicated) to hook into rendering process so that that only background and text color is changed and everything else (images) is rendered as-is.

I haven’t look into it deeply.

1 Like
I chose SumatraPDF because:
I _Love the way images are displayed ( "inverted" ) on a black background.

It would be enough for me to _Briefly see images ( human faces ) unaltered.
The next time the page is drawn ( refreshed ), revert to the way it was ( "inverted" ).

If you like Black Backgrounds, checkout the "Dark Reader" extension
for Google Chrome... it works well.

A post was merged into an existing topic: How to customise colors for Light/Dark theme (Day/Night mode)

There is a way to toggle dark mode on the fly without restart SPR? Command line, SendMessage, …

Please add gui option to invert colors, most people don’t want to edit config files.


Current 3.4 Pre-Release now has (Same as MuPDF-GL) ,

the invert key set to i
and the former info function has been changed to Shifted i