Editing Producing a stippled image with Gimp

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 4: Line 4:
 
To produce TSP art of an image, you will first want to generate a stippled rendition of the image.  That is, you need to stipple the image.  The stipples themselves will then be the cities in the Travelling Salesman Problem to be solved.  The traveller will move from stipple to stipple on your canvas and their path will be your TSP art.
 
To produce TSP art of an image, you will first want to generate a stippled rendition of the image.  That is, you need to stipple the image.  The stipples themselves will then be the cities in the Travelling Salesman Problem to be solved.  The traveller will move from stipple to stipple on your canvas and their path will be your TSP art.
  
The easiest way to stipple your image is with a stippling extension to your image editor.  If your image editor lacks a stippling extension, you will need another means to generate stipplings.  This document explains how to do so with Gimp, the GNU Image Manipulation Program, which may be downloaded from,
+
The easiest way to stipple your image is with a stippling extension to your image editor.  If your image editor lacks a stippling extension, you will need another means to generate stipplings.  This document explains how to do so with Gimp, the GNU Image Manipulation Program.
 +
 
 +
Gimp may be downloaded from
  
 
:[http://www.gimp.org/ www.gimp.org]
 
:[http://www.gimp.org/ www.gimp.org]
Line 21: Line 23:
  
 
Now for the detailed steps. [Note that on a Mac, Gimp's menu does not appear along the top of your screen but rather along the tops of the individual GImp windows.]
 
Now for the detailed steps. [Note that on a Mac, Gimp's menu does not appear along the top of your screen but rather along the tops of the individual GImp windows.]
 
  
 
'''1. Open your image file in Gimp'''<br/>
 
'''1. Open your image file in Gimp'''<br/>
Line 28: Line 29:
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step01.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step01.png
  
A file selection dialog will appear.  Navigate to the file containing your image and click the "Open" button.  [Note that on some platforms, Gimp supports drag-n-drop to select and open an image file.]
+
A file selection dialog will appear.  Navigate to the file containing your image and click the "Open" button.  Gimp will likely toss up a question like the one shown below.  You can click "Cancel" or "Assign".  For our purposes, either choice is okay.
 
 
Upon opening your image file, Gimp will likely toss up a question like the one shown below.  You can click "Cancel" or "Assign".  For our purposes, either choice is okay.
 
  
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step02.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step02.png
Line 37: Line 36:
  
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step03.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step03.png
 
  
 
'''2. Convert your image to grayscale'''<br/>
 
'''2. Convert your image to grayscale'''<br/>
Line 47: Line 45:
  
 
[http://wiki.evilmadscience.com/s3/eggbot/tspart/step05.png
 
[http://wiki.evilmadscience.com/s3/eggbot/tspart/step05.png
 
  
 
'''3. Wash out the image'''<br/>
 
'''3. Wash out the image'''<br/>
Line 61: Line 58:
  
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step08.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step08.png
 
  
 
'''4. Stipple the image'''<br/>
 
'''4. Stipple the image'''<br/>
To produce the stipples we will convert the image to black and white, dithering it in the process.  In graphics, "dithering" is the process of intermixing colored pixels from the allowed palette of colors to produce what our human eyes will interpret as an intermediate color not found in the palette.  When the palette only contains black and white pixels, dithering attempts to mix differing amounts of black and white pixels so as to produce the appearance of shades of gray.
+
To produce the stipples we will convert the image to black and white, dithering it in the process.  In graphics, "dithering" is the process of intermixing colored pixels from the allowed palette of colors to produce what our human eyes will interpret as an intermediate color not found in the palette.  When the palette only contains black and white pixels, dithering attempts to mix differing amounts of black and white so as to produce shades of gray.
  
 
To convert the image to black and white, use the "Mode..." item in the "Image" drop down menu.  Select the "Indexed..." mode,
 
To convert the image to black and white, use the "Mode..." item in the "Image" drop down menu.  Select the "Indexed..." mode,
Line 70: Line 66:
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step09.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step09.png
  
The "Convert Image to Indexed Colors" window will then appear.  In this window, select "Use black and white (1-bit) palette" for the colormap.  Also, for dithering select "Floyd-Steinberg (normal)".
+
The "Convert Image to Indexed Colors" window will then appear.  In this window, select "Use black and white (1-bit) palette" for the colormap [sic].  Also, for dithering select "Floyd-Steinberg (normal)".
  
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step10.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step10.png
Line 78: Line 74:
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step11.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step11.png
  
If you do not see individual stipples, or there are too many, or some regions just look like a gray cloud, then you probably have too many stipples.  Go back to Step 2 and reduce the size of the image to 50 or 25% of its original size.  Alternatively, you can wash the image out even more in Step 3.  Or, try both.  The image size may be reduced with the "Scale Image..." item of the "Image" drop down menu. Yet another technique is to boost the contrast of the image while it is still in grayscale.  In the two side-by-side images below, the stippled image on the right has had its contrast increased by 50% prior to being stippled.  To adjust contrast with Gimp, use the "Brightness-Contrast..." item of the "Colors" menu.
+
If you do not see individual stipples, or there are too many, or some regions just look like a gray cloud, then you probably have too many stipples.  Go back to Step 2 and reduce the size of the image to 50 or 25% of its original size.  Or, alternatively, wash the image out even more in Step 3.  Or, try both.  The image size may be reduced with the "Scale Image..." item of the "Image" drop down menu.
 
 
http://mtbaldy.us/~dnewman/tspart/step11b.png
 
 
 
  
 
'''5. Save the stippled image as a PBM file'''<br/>
 
'''5. Save the stippled image as a PBM file'''<br/>
Once you are satisfied with your stippling effort, save your result in a new file.  For use with the Python scripts described at [[Generating TSP art from a stippled image]], you must save the stippled image using the PBM format (Portable Bit Map).  This is easily achieved with Gimp.  First, from the "File" menu select the "Save As..." item,
+
Once you are satisfied with your stippling effort, save your result in a new file.  For use with the Python scripts described at (to be determined), you must save the stippled image using the PBM format (Portable Bit Map).  This is easily achieved with Gimp.  First, from the "File" menu select the "Save As..." item,
  
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step12.png
 
http://wiki.evilmadscience.com/s3/eggbot/tspart/step12.png
Line 97: Line 90:
  
 
Now, go ahead and click the "Save" button.  You may be presented with a window with the title "Save as PNM".  That's misleading but don't worry: a PBM file will be produced.  You can select either "Raw" or "ASCII" as the data formatting: the TSP art scripts accept either.  The raw format takes up much less space and is faster for the TSP art tools to load, so you might as well pick "Raw".
 
Now, go ahead and click the "Save" button.  You may be presented with a window with the title "Save as PNM".  That's misleading but don't worry: a PBM file will be produced.  You can select either "Raw" or "ASCII" as the data formatting: the TSP art scripts accept either.  The raw format takes up much less space and is faster for the TSP art tools to load, so you might as well pick "Raw".
 
Note that if you simply type the file name with ".pbm" as the file's extension, then Gimp will automatically save the file as a PBM file.  This is a shortcut to usin the "Select File Type" list.
 
 
  
 
'''6. Generate TSP art'''<br/>
 
'''6. Generate TSP art'''<br/>

Please note that all contributions to Evil Mad Scientist Wiki are considered to be released under the GNU Free Documentation License 1.3 (see Evil Mad Scientist Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)