mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 10:39:01 -06:00
Create from images (doc_create, and image_xobject for stamps, signatures and inserted images) dropped a JPEG's or PNG's embedded ICC profile, so a CMYK JPEG became untagged /DeviceCMYK. - JPEG: the APP2 ICC_PROFILE chunks are joined by sequence number; a profile with a missing or repeated chunk is ignored. - PNG: the iCCP profile is read. - A profile whose header is sound (acsp) and whose colour space matches the image (GRAY/RGB/CMYK for 1/3/4 components) becomes [/ICCBased <stream>] with /N and the device space as /Alternate. Anything else keeps the device space, as before. JPEG data and an Adobe CMYK /Decode are unchanged. - Images in one document that carry the same profile share one profile object. TIFF profiles are not read yet. Co-authored-by: lloyd <lloyd@stackworx.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>