sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.42k stars 1.71k forks source link

Color issue: RGB 217 becomes 224. #4321

Open cheonman opened 3 months ago

cheonman commented 3 months ago

SumatraPDF version

Describe the bug PDF with A) included image and B) colored shape, where A) and B) should have the same background color of RGB (217,217,217), shows RGB (217,217,217) for the image and RGB (224,224,224) for the shape.

To Reproduce Steps to reproduce the behavior:

  1. Open test.pdf in SumatraPDF.
  2. The QR-Code shows a different background color (gray) than the surrounding shape.
  3. Compare this with Acrobat Reader, Firefox, Google Chrome, Foxit Reader, PDFgear, Inkscape. They all show no difference in the background color.

Expected behavior The identical color should be displayed, i.e., RGB (217,217,217).

File that reproduces the problem test.pdf

Screenshots SumatraPDF: image Acrobat Reader: image

Additional context The PDF was exported from PowerPoint.

GitHubRulesOK commented 3 months ago

suspect its the long term MuPDF issue was only "partially fixed" last time reported, so at least 2 similar open issues. image vectors are primarily (fuzzy) ��� (NULLs) on a (predominantly ) RGB field of ÙÙÙ (D9's=217s) page grey slab is .851 g of 1 (217.005) as image background also included is the image boundary as .608 .0392 .49 rg [155 10 125] so a lot of colour transforms in the mix to interfere.

However agreed that without any colour profile then [127 127 127] overlaid on 127 box the expectation is 0,0,0 differential.

MuPDF seems to have a 7 bit shift so is that a significant miscalculation or an unwanted deliberate device colour correction ? previous open issue where colour was improved but greys were not https://github.com/sumatrapdfreader/sumatrapdf/issues/394 Also related to grey transparency https://github.com/sumatrapdfreader/sumatrapdf/issues/1103

kjk commented 3 months ago

I've opened https://bugs.ghostscript.com/show_bug.cgi?id=707847