OpenNoteScanner icon indicating copy to clipboard operation
OpenNoteScanner copied to clipboard

Conversion to PDF inverts the colors.

Open whatever42 opened this issue 3 years ago • 3 comments

Scanning worked fine. However, when I wanted to convert the resulting JPEG into a PDF, I was displayed a PDF with inverted colors (white text on black background).

Steps to reproduce

  • Scan a document (I only tried documents with black text on white background so far).
  • Open the Documents-Section (second round green button from the top)
  • Press on the newly scanned Document long, so the "Convert to PDF"-Option shows up
  • Select the "Convert to PDF" Option
  • Observe that the Colors are inverted in the displayed PDF

Expected behaviour

The PDF should look just like the JPEG that was converted.

Actual behaviour

The PDF looks like the JPEG with inverted colors (black text on white background).

Environment

I used Open Note Scanner 1.0.35-fdroid (35) on a Fairphone3+ running /e/ OS 0.21 (Android 11)

Would you like to work on the issue?

I am a Software Developer, but I never worked on Android/Fdroid before, so it would take me ages to get a Development Environment setup and running. I am hence pretty sure that you are able to fix this much faster than me.

whatever42 avatar Feb 23 '22 10:02 whatever42

Very strange, more strange is that on my installation the colors inverted when opening the image in the gallery, but the PDF was displayed with correct colors.

allgood avatar Feb 23 '22 12:02 allgood

On my tests the colors where inverted because of my phone's "night mode".

allgood avatar Feb 24 '22 12:02 allgood

Thanks for investigating this issue.

I can confirm that. I use a Fairphone3 and my phone does not have a "night mode", but a similar setting called "dark design" which is usually enabled on my device. When disabling dark design, the color inversion does not happen any more and I can convert scanned documents into PDFs without any further problems.

whatever42 avatar Mar 07 '22 17:03 whatever42