mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-28 12:08:46 -06:00
hayro-interpret draws every image XObject inside a transparency group that applies the fill opacity (ca). A stencil mask (/ImageMask true) also takes the fill colour, with that same alpha, as its paint, so the opacity was applied twice: at ca 0.5 a mask was drawn at 25 %, at ca 0.25 at about 6 %. Rectangles and raster images were right. Vendored hayro-interpret patch (36) resets the fill alpha to 1 once the image's group is pushed, before the stencil's paint is taken; the saved state is restored after the image. Type 3 glyph and pattern stencils take their paint from the glyph or pattern and are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz