gmic-community icon indicating copy to clipboard operation
gmic-community copied to clipboard

I don't know if this is a bug.

Open 291ce4321ac opened this issue 1 year ago • 0 comments

In iain_fergusson.gmic, in the Tone CMYK section, line 209, we have this: compose_multiply[-1,-2] One of these two arguments is a 4-channel CMYK image, the other is a 1-channel array used for scaling the adjusted image based on the saturation.

The problem here is that compose_multiply relies on to_colormode, which treats 4-channel images as RGBA. This results in the 1-channel image being expanded 3x, not 4x. The fourth channel of the expanded scaling image is a flat field (intended to be 100% alpha) independent of the image being expanded. As a consequence, this output-scaling feature does not actually influence the K channel at all. I don't know if that's intended. It doesn't really seem like it.

Disclaimer: My entire familiarity with GMIC has been reverse engineering this file, and it's been over a year since I did that. I'm just recalling this from my old notes. I also have no idea if this is the appropriate way to bring up this sort of question.

291ce4321ac avatar Jul 08 '23 03:07 291ce4321ac