I am working on a project that requires me to separate out each color in a CYMK image and generate a halftone image that will be printed on a special halftone printer. The method used is analogues to silk screening in that the process is almost identical. Take a photo and break out each color channel. Then produce a screen for the half tone. Each color screen must have it’s screen skewed by 15-45 (adjustable) degrees. Dot size and LPI must be calculated from user configurable values to achieve different effects. This process I am told is used in silk screening but I have been unable to locate any information that explains CYMK halftoning. I find plenty for reducing to a single color and generating new print style b/w halftone image.
I would guess that I need to:
- split the file into it’s color channels.
- generate a monochrome halftone image for that channel.
- Skew the resultant halftone image by the number of degrees * channel number.
Does anyone know if this is the correct approach and any existing python code for this? Or of any good explanations for this process or algorithms?
I used to run a screen printing studio (it was a fairly small one), and although I have never actually done colour separation printing, I am reasonably familiar with the principles. This is how I would approach it:
Now you have your colour separated images. As you mention, the rotation step reduces dot alignment issues (which would mess everything up), and things like Moiré pattern effects will be reasonably minimized.
This should be pretty easy to code using PIL.
Update 2:
I wrote some quick code that will do this for you, it also includes a
GCRfunction (described below):This will turn this:
into this (blur your eyes and move away from the monitor):
Note that the image sampling can be pixel by pixel (thus preserving the resolution of the original image, in the final image). Do this by setting
sample=1, in which case you need to setscaleto a larger number so that there are a number of possible dot sizes. This will also result in a larger output image size (original image size * scale ** 2, so watch out!).By default when you convert from
RGBtoCMYKtheKchannel (the black channel) is empty. Whether you need theKchannel or not depends upon your printing process. There are various possible reasons you might want it: getting a better black than the overlap ofCMY, saving ink, improving drying time, reducing ink bleed, etc. Anyhow I’ve also written a little Grey component replacement functionGCR, so you can set the percentage ofKchannel you want to replaceCMYoverlap with (I explain this a little further in the code comments).Here is a couple of examples to illustrate. Processing the
letter Ffrom the image, withsample=1andscale=8, so fairly high resolution.The 4
CMYKchannels, withpercentage=0, so emptyKchannel:combines to produce:
CMYKchannels, withpercentage=100, soKchannel is used. You can see the cyan channel is fully supressed, and the magenta and yellow channels use a lot less ink, in the black band at the bottom of the image: