pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-2111) Cast error in Gouraud shadings
Date Tue, 03 Jun 2014 15:15:02 GMT
Tilman Hausherr created PDFBOX-2111:
---------------------------------------

             Summary: Cast error in Gouraud shadings
                 Key: PDFBOX-2111
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2111
             Project: PDFBox
          Issue Type: Bug
          Components: Rendering
    Affects Versions: 1.8.5, 1.8.6, 2.0.0
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 1.8.6, 2.0.0, 1.8.5


There's a bug in Type4ShadingContext and Type5ShadingContext:
{code}
        long maxSrcCoord = (int) Math.pow(2, bitsPerCoordinate) - 1;
        long maxSrcColor = (int) Math.pow(2, bitsPerColorComponent) - 1;
{code}
should be
{code}
        long maxSrcCoord = (long) (Math.pow(2, bitsPerCoordinate) - 1);
        long maxSrcColor = (long) (Math.pow(2, bitsPerColorComponent) - 1);
{code}
The problem is that maxSrcCoord is 7FFFFFFF instead of FFFFFFFF when bitsPerCoordinate is
32.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message