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

Tilman Hausherr edited comment on PDFBOX-6232 at 8/8/26 8:13 AM:
-----------------------------------------------------------------

It happened in PDFBOX-5966. The comment at the end 😬


was (Author: tilman):
Might be PDFBOX-5966. The comment at the end LOL. (Going to sleep)

> PDF to Image conversion mis-rendered (transparency/soft-mask) due to PDFBox 
> 3.0.6 regression
> --------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-6232
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6232
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Kabir Soneja
>            Priority: Major
>         Attachments: pdfbox_softmask_regression_ipfree.pdf
>
>
> _Regression in PDFBox 3.0.5+ — rendering a page that composites a luminosity 
> soft-mask (whose mask group is a shading-pattern gradient) through a tiling 
> pattern inside an isolated transparency group causes the group backdrop to 
> bleed through as hard-seamed horizontal bands. A region that should be a 
> smooth gradient instead collapses toward the backdrop color_
> _Environment:_ PDFBox tools {{render}} (PDFRenderer / ImageIO), Java 17+, 
> DeviceRGB, any DPI (observed at 165 DPI).
> _Steps to reproduce:_
>  # Take the attached PDF (single page; no fonts, no text, no metadata; 
> content is a synthetic blue→green gradient over a dark-red backdrop).
>  # Render page 1 to an image with 3.0.4 and again with 3.0.6/3.0.7/3.0.8, 
> e.g.:
> {{java -jar pdfbox-app-<ver>.jar render -i reproducer.pdf -dpi 165 -format 
> png}}
> _Expected (3.0.4):_ the masked region shows a smooth, continuous gradient; 
> the backdrop is fully covered where the soft-mask luminosity is high. 
> Sampling a fixed band in the upper third yields a bright, saturated color 
> (blue channel ~220).
> _Actual (3.0.5+):_ the same band is broken into hard-edged horizontal seams 
> with the dark backdrop bleeding through; the sampled band collapses toward 
> the backdrop (blue channel ~80).
> _Structure that triggers it (PDF operators):_
>  * Page paints an _isolated transparency group_ ({{{}/Group << /S 
> /Transparency /I true /CS /DeviceRGB >>{}}}).
>  * Inside the group: a dark backdrop fill, then a fill painted via a _Type-1 
> tiling pattern_ ({{{}/Pattern cs /P scn{}}}).
>  * The tiling pattern's content stream sets an ExtGState carrying a 
> _luminosity soft mask_ ({{{}/SMask << /S /Luminosity /G <group> >>{}}}), then 
> fills using a _Type-2 shading pattern_ (axial gradient) as the visible color.
>  * The soft-mask group itself fills via _another Type-2 shading pattern_ (an 
> axial gradient), giving the mask partial/variable luminosity.
> The interaction of (isolated group) × (luminosity soft mask driven by a 
> shading-pattern gradient) × (tiling pattern) is what regressed — removing any 
> one of those three elements makes the defect disappear. Solid-color 
> masks/fills do not trigger it; the shading-pattern (gradient) mask is 
> required.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to