mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
The PostScript interpreter that reads EPS and PostScript files turned the samples of a CMYK image into display RGB and stored an RGBA PNG, so the image lost its ink amounts. The DCTDecode filter decoded a CMYK JPEG to RGB, so it lost its ink amounts too. The PDF importer keeps the ink amounts of 8- and 16-bit CMYK images (in a CMYK TIFF, or the CMYK JPEG itself). A CMYK image (image or colorimage in DeviceCMYK, CIEBasedDEFG or a four-component ICCBased space) now keeps its samples in a CMYK TIFF (ImageBlob::cmyk_tiff), read through its Decode array, at every bit depth the interpreter reads. A CMYK JPEG gives its samples as stored, and the image's Decode array reads them: [1 0 1 0 1 0 1 0] undoes the inverted samples of Adobe's CMYK JPEGs. The pixels that a MaskColor or an ImageType 3 mask hides become a grayscale opacity mask over the image, as in PDF import. A mask that hides nothing adds no mask. Gray, RGB, indexed and spot color images and image masks stay RGBA PNGs. Docs: docs/file-format-parity.md, docs/target-app-parity.md.