Skip to content

Page.CMYKProfile; cera -cmyk writes a CMYK TIFF - #236

Draft
timzifer wants to merge 1 commit into
mainfrom
claude/cli-cmyk
Draft

timzifer wants to merge 1 commit into
mainfrom
claude/cli-cmyk

Conversation

@timzifer

Copy link
Copy Markdown
Owner

Follow-up of #209 / #235.

  • Page.CMYKProfile() []byte: the ICC profile RenderCMYK draws the page in — the caller's (OpenOptions.CMYKProfile), or that of the page's or the document's output intent; nil for the bundled SWOP (a table, not a profile), NaiveCMYK, IgnoreOutputIntent, or an intent profile cera cannot use. The intent profile is decoded again on request, not kept in memory.
  • cera -cmyk -o 'press-%d.tif' in.pdf: RenderCMYK into a TIFF of CMYK samples carrying that profile. Refused with -gray, -transparent or a non-TIFF output.

Draft: cmd/cera points at calamus PR timzifer/calamus#36 (pseudo-version bd50c16); switched to the calamus tag once #36 is merged and tagged.

Checked: a corpus page written with -cmyk reads in Pillow (libtiff) as CMYK, black text on K only, with the 54 kB profile given by -cmyk-profile; tests for the profile choice (intents of page over document, caller's, naive, ignored, bundled, unusable profile) and for the TIFF tags.

Page.CMYKProfile returns the ICC profile RenderCMYK draws a page in: the
caller's, or that of the output intent of the page or the document; nil
for the bundled SWOP, which is a table, not a profile. The intent's
profile is decoded again when asked for, not kept.

cera -cmyk draws with RenderCMYK into a TIFF of CMYK samples that carries
that profile (calamus' TIFF encoder writes *image.CMYK as separated
samples and embeds profiles).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant