Difference between revisions of "Color TSP art"
Line 15: | Line 15: | ||
== Color separation == | == Color separation == | ||
+ | |||
+ | First, ensure that you are using an image editor which supports CMYK color models. In the discussion which follows, directions are provided for Adobe Photoshop [1, 2]. | ||
+ | |||
+ | After opening your image file in Photoshop, change the color model to CMYK via the "Mode..." item of the "Image" menu. Under the "Mode..." item, select "CMYK Color". If asked which specific CMYK color model to convert to, just go ahead and use the default which Photoshop suggests. At this point, save your image file as a new file and use the "Photoshop" format, .psd. | ||
+ | |||
+ | To separate each color out, we will use a fairly manual technique. A better technique may well exist. | ||
+ | |||
+ | # '''Cyan''': Under the "Image" menu, select the "Adjustments..." item. In the pop-up menu under "Adjustments...", select "Levels...". This will bring up a new window with the title "Levels". In this window, use the "Channel:" drop down list to select "Magenta". Then, set the output level for magenta to be "255" in the box on the left hand side. (The box on the right hand side should already read "255".) Once you do this, you should see the magenta component disappear from the image. Now, repeat this step with the yellow and black channels as well. Once you've done this to the magenta, yellow, and black channels, your image will only have the cyan channel remaining. Save the image as a new file named "cyan.tif". Select TIFF as the output format [3]. When presented with some TIFF file options, use the defaults presented. | ||
+ | # '''Magenta''': Now re-open the image file you created as a Photoshop (.psd) file. This gives you the image again in a CMYK color space and with all channels present. Now, repeat the process of blanking out three of the color channels, but this time preserving magenta and setting the output levels to 255 for cyan, yellow, and black. Save the result as a TIFF file named magenta.tif. | ||
+ | # '''Yellow''': Again, re-open the image file you created as a Photoshop (.psd) file. Set the output levels of the cyan, magenta, and black channels to 255. Leave the yellow channel untouched. Save the result as a TIFF file named yellow.tif. | ||
+ | # '''Black''': Finally, re-open the .psd image file. Set the output levels of the cyan, magenta, and yellow channels to 255. Leave the black channel unchanged. Save the result as a TIFF file named black.tiff. | ||
+ | # Quit out of Photoshop. | ||
== Stipple each color layer == | == Stipple each color layer == | ||
+ | |||
+ | Follow the directions from [[Producing a stippled image with Gimp]] to generated stippled images of your four TIFF files, cyan.tif, magenta.tiff, yellow.tiff, and black.tiff. When adjusting the output levels in each image to "wash it out", try to use the same output level for each file. Save the results as cyan.pbm, magenta.pbm, yellow.pbm, and black.pbm. | ||
== Generate TSP art == | == Generate TSP art == | ||
+ | |||
+ | When generating the TSP art, we will use the --line-color switch to tspart.py to control the line color used for each of our channels. Also, so as to make output SVG files which can be glued together into a single SVG file, we will also use the --pre, --mid, and --post options to tspart.py. Those options allow us to say that one output file is to include the preamble to a SVG file, another output file should have the postamble, and the other files should have neither preamble nor postamble. Each individual file will not be a valid SVG file. However, when all the files are glued together into a single SVG file, they will create a valid SVG file. | ||
+ | |||
+ | Before proceeding, we should consider the order in which we want to draw the colors. On our Eggbot, we probably want to draw yellow first, followed by cyan, then magenta, and then black. This way we don't soil our yellow pen tip by drawing on darker colors. Similar considerations hold for cyan and magenta. However, when drawing on our screen, we want the reverse ordering so that yellow doesn't get completely lost under the other colors. On our screen, the colors won't blend: instead yellow pixels will simply be replaced by pixels of other colors which draw over them. | ||
== Combine into a single SVG file == | == Combine into a single SVG file == | ||
+ | |||
+ | == Notes == | ||
+ | [1] As of this writing, a free 30-day trial version of Photoshop is available for download from Adobe. This trial version supports the CMYK operations described here. | ||
+ | [2] Unfortunately, Gimp is not capable of working with CMYK color models. | ||
+ | [3] While Gimp can read .psd files, it cannot process .psd files with CMYK color models. | ||
---- | ---- | ||
[[Advanced stippling|<<< Advanced stipping]] || Color TSP art | [[Advanced stippling|<<< Advanced stipping]] || Color TSP art |
Revision as of 18:33, 3 October 2010
<<< Advanced stipping || Color TSP art
Contents
Introduction
While yet to be proven a viable Eggbot art form, our adventures with TSP art need not end with monochrome imagery. By separating a color image into its cyan, magenta, yellow, and key (black) components, and then treating each component as a separate image to generate TSP art for, we can produce a color likeness of the original image by recombining the four pieces of TSP art.
The basic plan of attack is then
- Using an image editor which understands the CMYK color spaces such as Adobe Photoshop, change your image's color model to CMYK.
- Save each color layer in a separate file using a bitmap format understood by Gimp (e.g., TIFF).
- In Gimp, produce stippled images for each color layer as per Producing a stippled image with Gimp.
- Generate TSP art for each stippled color layer using some special command line options for tspart.py.
- Combine the TSP art files for the four layers into a single SVG file.
Color separation
First, ensure that you are using an image editor which supports CMYK color models. In the discussion which follows, directions are provided for Adobe Photoshop [1, 2].
After opening your image file in Photoshop, change the color model to CMYK via the "Mode..." item of the "Image" menu. Under the "Mode..." item, select "CMYK Color". If asked which specific CMYK color model to convert to, just go ahead and use the default which Photoshop suggests. At this point, save your image file as a new file and use the "Photoshop" format, .psd.
To separate each color out, we will use a fairly manual technique. A better technique may well exist.
- Cyan: Under the "Image" menu, select the "Adjustments..." item. In the pop-up menu under "Adjustments...", select "Levels...". This will bring up a new window with the title "Levels". In this window, use the "Channel:" drop down list to select "Magenta". Then, set the output level for magenta to be "255" in the box on the left hand side. (The box on the right hand side should already read "255".) Once you do this, you should see the magenta component disappear from the image. Now, repeat this step with the yellow and black channels as well. Once you've done this to the magenta, yellow, and black channels, your image will only have the cyan channel remaining. Save the image as a new file named "cyan.tif". Select TIFF as the output format [3]. When presented with some TIFF file options, use the defaults presented.
- Magenta: Now re-open the image file you created as a Photoshop (.psd) file. This gives you the image again in a CMYK color space and with all channels present. Now, repeat the process of blanking out three of the color channels, but this time preserving magenta and setting the output levels to 255 for cyan, yellow, and black. Save the result as a TIFF file named magenta.tif.
- Yellow: Again, re-open the image file you created as a Photoshop (.psd) file. Set the output levels of the cyan, magenta, and black channels to 255. Leave the yellow channel untouched. Save the result as a TIFF file named yellow.tif.
- Black: Finally, re-open the .psd image file. Set the output levels of the cyan, magenta, and yellow channels to 255. Leave the black channel unchanged. Save the result as a TIFF file named black.tiff.
- Quit out of Photoshop.
Stipple each color layer
Follow the directions from Producing a stippled image with Gimp to generated stippled images of your four TIFF files, cyan.tif, magenta.tiff, yellow.tiff, and black.tiff. When adjusting the output levels in each image to "wash it out", try to use the same output level for each file. Save the results as cyan.pbm, magenta.pbm, yellow.pbm, and black.pbm.
Generate TSP art
When generating the TSP art, we will use the --line-color switch to tspart.py to control the line color used for each of our channels. Also, so as to make output SVG files which can be glued together into a single SVG file, we will also use the --pre, --mid, and --post options to tspart.py. Those options allow us to say that one output file is to include the preamble to a SVG file, another output file should have the postamble, and the other files should have neither preamble nor postamble. Each individual file will not be a valid SVG file. However, when all the files are glued together into a single SVG file, they will create a valid SVG file.
Before proceeding, we should consider the order in which we want to draw the colors. On our Eggbot, we probably want to draw yellow first, followed by cyan, then magenta, and then black. This way we don't soil our yellow pen tip by drawing on darker colors. Similar considerations hold for cyan and magenta. However, when drawing on our screen, we want the reverse ordering so that yellow doesn't get completely lost under the other colors. On our screen, the colors won't blend: instead yellow pixels will simply be replaced by pixels of other colors which draw over them.
Combine into a single SVG file
Notes
[1] As of this writing, a free 30-day trial version of Photoshop is available for download from Adobe. This trial version supports the CMYK operations described here. [2] Unfortunately, Gimp is not capable of working with CMYK color models. [3] While Gimp can read .psd files, it cannot process .psd files with CMYK color models.
<<< Advanced stipping || Color TSP art