Whether you need the K channel or not depends upon your printing process. This will also result in a larger output image size (original image size * scale ** 2, so watch out!).īy default when you convert from RGB to CMYK the K channel (the black channel) is empty. Do this by setting sample=1, in which case you need to set scale to a larger number so that there are a number of possible dot sizes. Note that the image sampling can be pixel by pixel (thus preserving the resolution of the original image, in the final image). Into this (blur your eyes and move away from the monitor): Half_tone = half_tone.crop((xx, yy, xx + im.size*scale, yy + im.size*scale)) Half_tone = half_tone.rotate(-angle, expand=1) X_pos, y_pos = (x+edge)*scale, (y+edge)*scaleĭraw.ellipse((x_pos, y_pos, x_pos + box_edge, y_pos + box_edge), fill=255) Size = channel.size*scale, channel.size*scaleįor x in xrange(0, channel.size, sample):įor y in xrange(0, channel.size, sample):īox = channel.crop((x, y, x + sample, y + sample)) Resolution, but scale must be >1 to allow variation in dot size.'''Ĭhannel = channel.rotate(angle, expand=1) So sample=1 will presevere the original image Output dot diameter is given by sample * scale (which is also the number sample (pixels),ĭetermines the sample box size from the original image. '''Returns list of half-tone images for cmyk image. Gray = min(cmyk, cmyk, cmyk) * percentage / 100 Percentage gray component removed from the CMY channels and put in the '''basic "Gray Component Replacement" function. I wrote some quick code that will do this for you, it also includes a GCR function (described below): import Image, ImageDraw, ImageStat This should be pretty easy to code using PIL. 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. Now you have your colour separated images.
0 Comments
Leave a Reply. |