Add channels to CMYK file output #4995
Replies: 11 comments 17 replies
-
As far as I know, IM cannot (yet) write extra channels ("metachannels") to TIFF, or any format except "ftxt:". EDIT: Correction: metachannels are also written to the "mpc:" format. |
Beta Was this translation helpful? Give feedback.
-
ImageMagick 7 was designed to handle meta-channels internally and thus far only the FTXT and MPC image formats fully support the extra channels. We need to increase our support, so let's start with your use case. Attach a Zip archive to this post with your original source image and any extra channels with a note on how you would like the TIFF image to handle the extra channels. We currently support CMYKA so its likely just a question of supporting the extra channel you call varnish. |
Beta Was this translation helpful? Give feedback.
-
How about a syntax such as:
|
Beta Was this translation helpful? Give feedback.
-
The latest commits to the main repo support multispectral images. This means
properly clones the source image. We have generalized support to other combinations of channels and image formats, however, we will evolve the support as to reduce risk in breaking existing workflows. Instead, we need additional use cases, one at a time, until we have a set of multi-spectral images and use cases we can use for testing any generalized multispectral solution. |
Beta Was this translation helpful? Give feedback.
-
Here is an example of what the resulting output file should contain |
Beta Was this translation helpful? Give feedback.
-
@snibgo, we'll need a patch for this to work with |
Beta Was this translation helpful? Give feedback.
-
I tried playing with -channel-fx and could not get it to work saving to TIFF. |
Beta Was this translation helpful? Give feedback.
-
The input file 219971487-b828a14f-a545-4133-a7c1-3cb2091b985c.png shown above is 1050x746 pixels, with RGBA channels. Alpha is entirely opaque. The three colour channels are equal.
The file I assume we want to copy the input RGB channels to an output CMYKA plus one meta channel. Write pixels from the input file (Windows syntax):
The first three lines from 21997.txt are:
As required, we have six values per pixel. Read those into a new image, and save as a tiff file:
exiftool says:
So that looks good. The The input is sRGB but the output is CMYK with the same pixel values, so colours will be reversed when viewed. |
Beta Was this translation helpful? Give feedback.
-
For writing the ftxt file, I wrote:
You have changed this to:
... with an extra comma. When the ftxt coder reads the text file, the number of commas tells it how many channel values are on that line. An extra comma implies an extra channel, hence
You can use
|
Beta Was this translation helpful? Give feedback.
-
@snibgo, what if we want CMYK and two meta channels, no alpha? We tried:
and received a CMYK TIFF image with 4 channels. We were expecting CYKK with 2 extra "unspecified" samples. Is the issue with the TIFF writer? Or with FTXT? Or with internal channel handling inside ImageMagick? |
Beta Was this translation helpful? Give feedback.
-
From my reading of the TIFF standard, this should be possible. Of the TIFF "extra samples", only one channel should be either "1 = Associated alpha data (with pre-multiplied color)" or "2 = Unassociated alpha data", but any number may be "0 = Unspecified data". [EDIT: and there may be no alpha channels.] I have tried this, and couldn't make it work from IM. The ftxt writer and reader seem to be okay. You can test this by inserting " The issue seems to be in the TIFF writer in I think this is a bug in |
Beta Was this translation helpful? Give feedback.
-
I need to output CMYK image files with two additional channels for alpha(white) and varnish. I understand that internally IM can have extra channels. I'm looking for a way to write those channels to a TIFF output file. Is this something that might be in the works or is there a way to accomplish this that I haven't found?
Beta Was this translation helpful? Give feedback.
All reactions