[
https://issues.apache.org/jira/browse/PDFBOX-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15834978#comment-15834978
]
Tilman Hausherr edited comment on PDFBOX-1958 at 1/25/17 4:03 PM:
------------------------------------------------------------------
The problem is that the pattern color is rendered without any CTM applied. The
code in SampledImageReader.SampledImageReader() works for simple colors only,
not for patterns. More to come.
Edit: here's a text I prepared in May 2014 \(!) but never posted.
The (shading) pattern is to be understood as something that goes over the whole
page area, with the stencil being a "window" on this page. Thus it is wrong to
paint a (usually smaller) BufferedImage in SampledImageReader.getStencilImage()
without also considering the current ctm. Or rather, it is wrong to create the
paint without also considering the current ctm. PattyP2.pdf has a stencil image
that is in the middle of the page. So the shading should have negative
translations because the (0,0) coordinates of the BufferedImage are not the
(0,0) coordinates of the shading. Then there is the scale, this must also be
taken into account, by using the dimensions of the image.
was (Author: tilman):
The problem is that the pattern color is rendered without any CTM applied. The
code in SampledImageReader.SampledImageReader() works for simple colors only,
not for patterns. More to come.
> image mask outline with shading pattern is invisible
> ----------------------------------------------------
>
> Key: PDFBOX-1958
> URL: https://issues.apache.org/jira/browse/PDFBOX-1958
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Labels: Stencil, mask, shading, shadingpattern
> Fix For: 2.0.5, 2.1.0
>
> Attachments: cinnebar1.jpg, cinnebar.pdf, cinnebar.ps,
> gs-bugzilla690297.pdf, PATTYP2.pdf
>
>
> This is also somewhat of a regression: two weeks ago, the attached file had
> the image rendered in b/w, now it is invisible. I was able to get the image
> in another (wrong) color by changing one line in BeginInlineImage.java, the
> one with TODO to
> awtImage = image.getStencilImage(colorSpace.toPaint(color,
> image.getHeight())); // <--- TODO: pass page height?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]