Creates an image XObject from a buffer of samples, or returns the one this document already has for the same samples.
public PdfImage CreateImage(ReadOnlySpan<byte> samples, PdfImageLayout layout, PdfImageCompression compression)
The samples, in the layout layout describes: exactly ceil(Width × components × BitsPerComponent / 8) × Height bytes.
The size, colour space and bits per component.
How to compress the samples.
ISO 32000-2 §8.9.5 (Table 87), §7.4.4 (FlateDecode with Predictor 15, Table 8) or §7.4.8 (DCTDecode, through the document's DCT encoder). Records the versions of the compression, the colour space and 16-bit samples (PDF 1.5). A mutation.