Creates an image XObject with a soft mask from buffers of samples and alpha, or returns the one this document already has for the same buffers.
public PdfImage CreateImage(ReadOnlySpan<byte> samples, ReadOnlySpan<byte> alpha, PdfImageLayout layout, PdfImageCompression compression)
The colour samples, as for CreateImage(ReadOnlySpan<Byte>, PdfImageLayout, PdfImageCompression).
The opacity of each pixel, one sample per pixel at the layout's bits per component (0 transparent, the maximum opaque), rows byte-aligned: ceil(Width × BitsPerComponent / 8) × Height bytes.
The size, colour space and bits per component of both buffers.
How to compress the colour samples; the alpha is always compressed with Flate.
SMask is a DeviceGray image of the alpha.ISO 32000-2 §8.9.5 and §11.6.5.2 (soft-mask images, PDF 1.4). As the other overload; also records PDF 1.4. A mutation.