You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/08/14 15:59:00 UTC

[jira] [Commented] (PDFBOX-3897) Avoid sRGB self-conversions

    [ https://issues.apache.org/jira/browse/PDFBOX-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125865#comment-16125865 ] 

ASF subversion and git services commented on PDFBOX-3897:
---------------------------------------------------------

Commit 1805014 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1805014 ]

PDFBOX-3897: avoid sRGB self-conversion

> Avoid sRGB self-conversions
> ---------------------------
>
>                 Key: PDFBOX-3897
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3897
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.7
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>              Labels: optimization
>             Fix For: 2.0.8, 3.0.0
>
>         Attachments: PDFJS-6737-veryslow.pdf, PDFJS-8446-p1-slow.pdf
>
>
> 1)
> PDICCBased.java detects if the colorspace is sRGB, but does not use this advantage fully. {{toRGB()}} should return its argument when the colorspace is sRGB.
> The files from PDF.js issues 8446 and 6737 are much faster now. The speed improvement can be experienced with files that use such pseudo ICC colorspaces for shading, because there a large number of colors have to be converted.
> 2)
> PDDeviceRGB.java also converts colors to itself. {{awtColorSpace}} is the sRGB color space and so is {{/DeviceRGB}}, yet {{toRGB()}} calls {{awtColorSpace.toRGB()}} instead of just returning its argument.
> This second change does not have much influence on the speed of rendering on my old computer (4 cores). But on the new computer (8 cores, 16 threads) the complete rendering tests are now done in 300 instead of 400 seconds.
> Rendering regression tests show a lot of small differences. I assume that differences of 1/255 in a color somehow propagate and worsen, e.g. through transparency layers. I looked at a few, the differences are detected by the rendering tests but are invisible to my eye (in the diff file, the difference can be made visible by setting Gamma to minimum). I've therefore increased the tolerance to 3 units to avoid the work of analyzing hundreds of file differences. Those that remain are still invisible to my eye, except PDFBOX-3693-656282-p1-p8.pdf, which is very different but was different than Adobe before (the whole file is very broken and the first page logs over 3000 errors). I suspect it is an incorrect RGB value that isn't clipped anymore now.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org