Files
pdfcraft/crates/render
kronbiiandClaude Opus 5.5 c5065554a1 M2: shrink masked images a row at a time; keep near-1:1 scans sharp
Review of #3858 (aiongg):

- An area-shrunk image with a soft mask, a stencil's ink included,
  built its full-resolution RGBA before shrinking. A 10718 x 13701
  stencil at page size peaked at 1.16 GB (587 MB of RGBA). It is now
  premultiplied a source row at a time as it is averaged, and the
  shrink works a target row at a time, so it peaks at 1.03 GB, as the
  nearest-neighbour path did. Same bytes; about 5% slower per shrink.
- An image whose f32 scale passed 1 only by rounding was smoothed
  bilinearly and blurred by half a pixel at a half-pixel offset. It is
  now smoothed only above 1.01.
- A shrunk /ImageMask stencil keeping its thin strokes (#4800) is now
  tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:32:52 +02:00
..