Skip to content

Conversation

@ryanobeirne
Copy link

Hi! I am working in the digital textile printing space where CMYK+N printer profiles are common (CMYK+Orange+Violet, CMYK+Red+Green+Blue, etc.). I've run into an issue where lcms fails to detect the black point for the Relative Colorimetric intent on CMYK+N ICC profiles.

For example, converting the colors RGB8(0,0,0) (black) and RGB8(36,36,36) (dark gray) from sRGB to a CMYK+3 profile using Relative+BPC should produce 2 distinct grays, but lcms outputs the same color for both samples. This is in contrast to the Adobe BPC implementation in Photoshop that does the same transform but produces 2 distinct grays.

I believe I have traced the issue to the cmsDetectBlackPoint function in cmssamp.c: it appears as though lcms currently uses the Perceptual black point for Relative+BPC transforms only on CMYK profiles. I believe the Perceptual black point should also be used for Relative+BPC transforms on CMYK+N profiles as well.

In this patch, I have extended the cmsDetectBlackPoint function to use the Perceptual black point for cmsSigCmykData color spaces AND all the cmsSigNcolorData color spaces. However, I'm not sure if all of these color spaces should be included or if any additional color spaces should be included as well.

I have tested this patch on cmsSig6-8colorData output profiles (CMYK+2..CMYK+4) and found the results to be congruent with Adobe Photoshop. I am happy to provide CMYK+N profiles for testing if it is helpful.

@mm2
Copy link
Owner

mm2 commented Jan 9, 2026

Thanks! The reason to not using multi-ink in BPC is because the Adobe spec specifically forbids so:
https://www.color.org/adobebpc.pdf
I am now doing the release of 2.18, after that I will investigate if your patch can be used to detect perceptual black and eventually integrate in the engine.
Many thanks again for your collaboration.

@ryanobeirne
Copy link
Author

I assume you refer to this line in adobebpc.pdf:

Although ICC profiles can use generalized n-Color spaces, Adobe Systems currently does not apply its BPC
algorithm to such color spaces

It would appear this is no longer the case (nor should it ever have been, in my opinion). Adobe is definitely using BPC when converting to Multichannel profiles when the BPC option is selected in Photoshop.

multichannel-bpc

Additionally, I know of at least one RIP using LCMS as the color engine that similarly patches LCMS to do the same.

I still question my decision here to use cmsSigCmykData and all cmsSigNcolorData color spaces as the criteria for selecting the perceptual black point. Should the criteria be that the profile contains CMYK with or without additional channels? Does the distinction matter?

@mm2
Copy link
Owner

mm2 commented Jan 9, 2026

I have just released 2.18 and now I am ready to check it. I really appreciate your aid with this. In fact, BPC is just a plain scaling in XYZ and the difficult part is detecting black. Since there are many blacks and profiles behave differently I have to check what multi channel profiles do in such cases. I am keeping this PR open for the investigation.

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.

2 participants