Created attachment 22567 [details] A screenshot illustrating the problem At least some 24-bit PNG files, but probably all of them, are rendered by FOP with dull colors (see example.png). This can be seen even in a simple 8 pixel example. The image and its colors are correct (object 11 in the PDF); and the soft mask too (object 10 in the PDF). So there could be a problem with the ICC color profile after all (obj 5).
Created attachment 22568 [details] FO file FO source file for the example.
Created attachment 22569 [details] The test image.
Created attachment 22570 [details] The generated PDF
Created attachment 22572 [details] The PDF obtained without a soft mask This PDF is generated without a PDF soft mask by commenting out this.softmask =... in ImageRenderedAdapter.java:102 The colors are now bright and the PDF no longer has a soft mask bound to the image. But the third pixel from the left is now rendered opaque, while it should be completely transparent (thus, gray here). It's hard to understand whether the soft mask is conceptually "on top" of the image (thus, making the colors dull by interposing a sort of "veil") or related to the image transparency, thus between the image and the media ?
Created attachment 22573 [details] The Java source that generated the test image This is a fully stripped-down version of the custom cockpit-screenshots generator/editor that is used by our customer. Creates the test image in pretty much the same technical context as the "real" ones.
For reference: http://markmail.org/message/ykcb7re4bm4xyufs The thread contains some initial analysis of the problem but no solution, yet.
Created attachment 22574 [details] Image dump in the PDF Exactly what you would expect when reading the java code that generated the image.
Created attachment 22575 [details] Soft mask dump from the PDF Says in a rather straight manner that the thrid pixel is transparent and the rest is opaque; which is also what one would expect when reading the java source or looking at the PNG file at the bit level.
Created attachment 22587 [details] Test case with changing background Reading the chapter 7 (Transparency) of PDF 1.4 specification, I understood transparency is much about blending. So I tried the render with different color backgrounds but there seems to be no influence...
Created attachment 22588 [details] PDF render with different backgrounds.
Also discussed previously (by the same): http://markmail.org/message/gjrau3dfjmyfhne4
Playing with the AIS (Alpha Is Shape) parameter in the Graphics state does not fix the problem.
Created attachment 22715 [details] Same test case, FOP patched to add /AIS false
Created attachment 22716 [details] Same test case, FOP patched to add /AIS true
The dull colors are visible in Adobe Reader but not in Evince! Could the issue be with the viewer?
resetting P2 open bugs to P3 pending further review