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

Tilman Hausherr commented on PDFBOX-3000:
-----------------------------------------

{quote}
The calculation of the alpha value was wrong. It must not be premultiplied but 
simply be copied to the alpha channel.
{quote}

As a test, I modified softmask.java like this (and passed the softmask):
{code}
if (COSName.ALPHA.equals(softMask.getSubType()))
{
    rgba[3] = gray[0];
}
else
{
    rgba[3] = Math.round(rgba[3] * (gray[0] / 255f)); // multiply alpha
}                                      
{code}
However this resulted in bad rendering (much black) of
- evince-bug431088.pdf
- gs-bugilla691763.pdf
- gs-bugzilla689439-alphamask.pdf
- gs-bugzilla693322.pdf


> Transparency Group issues
> -------------------------
>
>                 Key: PDFBOX-3000
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3000
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>             Fix For: 2.1.0
>
>         Attachments: 007087-payment-due-p58_reduced2.pdf, 
> PDFBOX-1697-reduced-rotations.pdf, PDFBOX-3400-RGB.pdf, 
> PDFBOX-3494_reduced.pdf, PDFBox3359PanelTestEnhanced.java, PDFJS-2845-p1.pdf, 
> PDFJS-5811-2-p4_reduced-rotations.pdf, samsung_galaxy_s_4_um-p1_reduced.pdf, 
> softmask-rewrite-alt1.patch, softmask-rewrite.patch
>
>
> This is a follow-up issue for transparency group issues from PDFBOX-2423. 
> More details to come.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to