Returns the reduction to ask GetSamplesAt(Int32) for when the image is drawn under transform: the
largest power of two that still leaves at least samplesPerPixel samples per device pixel along the image's
most enlarged direction, within what the codec delivers and what the colour conversion allows.
public int GetReduction(in Matrix transform, double samplesPerPixel, PdfColorConverter? converter)
The transform from the unit square the image fills (user space, §8.9.4) to device pixels: the CTM times the device transform.
The fewest reduced samples per device pixel: 2 keeps the page within 36 dB of a full decode on photographs (the default of the viewers); 1 is faster and coarser. At least 1, so an image is never enlarged by its reduction.
The converter of the image's colour space to the device, or null when the samples are not converted (a soft
mask's opacity). A codec averages samples before colour conversion, which equals averaging after it only for an affine
conversion: for a curved one the reduction is capped at 1/2 (1/4 for a CalGray or CalRGB tone curve), for an Indexed image it
is 0, and the rasterizer averages the rest after converting.
ISO 32000-2 §8.9.4 (image space maps to the unit square through [1/W 0 0 −1/H 0 1]) and §8.9.5.3 (Interpolate only
changes enlargement, so it does not change the choice). With A the linear part of image space to device space, the reduction
s satisfies s ≤ 1 / (k · σmax(A)), σmax the larger singular value, which handles rotation and skew conservatively. The
region drawn does not matter: the choice depends on scale alone, so every tile of a page agrees. An image with a colour key
(§8.9.6.4, compared with raw samples) or a Matte (§11.6.5.2, removed with its soft mask at the image's size) is not reduced.