You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jason Pyeron (Jira)" <ji...@apache.org> on 2019/12/13 02:47:00 UTC
[jira] [Commented] (PDFBOX-4710) allow precise RGB stroke colors
with setStrokingColor
[ https://issues.apache.org/jira/browse/PDFBOX-4710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16995301#comment-16995301 ]
Jason Pyeron commented on PDFBOX-4710:
--------------------------------------
As much as I, a human, find the difference between 67 and 66.99997 to be obnoxious. It is a different value where byte for byte comparisons are concerned.
> allow precise RGB stroke colors with setStrokingColor
> -----------------------------------------------------
>
> Key: PDFBOX-4710
> URL: https://issues.apache.org/jira/browse/PDFBOX-4710
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 2.0.15
> Reporter: Jason Pyeron
> Priority: Major
> Attachments: pdfbox-4710.patch
>
>
> see patch
>
> PDF in the wild has {{0.262745 0.301961 0.631373 RG}} but this cannot be represented as a n/255 fraction.
>
> {code:java}
> package snippet;
> public class Snippet
> {
> public static void main(String[] args)
> {
> System.out.println(((int)67)/255f);
> System.out.println(0.2627451f*255f);
> System.out.println(0.262745f*255f);
> System.out.println(66.99997f/255f);
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org