Hosted by
Cstitch
A free and open source program for creating cross stitch patterns from images

A Note On Floss Color Codes and Names

DMC and Anchor are well known manufacturers of floss (cross stitch thread). Each floss that DMC sells has a color name and numeric code and each floss that Anchor sells has a numeric code, but neither DMC nor Anchor provides color (RGB) values for their floss, so the colors you see associated with numeric codes and/or color names in this program are best guess approximations of the floss color associated with a given code and/or color name. Neither DMC nor Anchor endorses these associations and neither has anything to do with this program, nor does this program particularly endorse DMC or Anchor: they just happen to be two common suppliers of floss.

Overview

Cstitch turns an image into a cross stitch pattern and allows you to edit the generated pattern. The final product is a pdf of the cross stitch pattern and a list of the colors in the pattern.

The transformation is a four step process.

1. Choose your colors active color chooser icon

There are three modes for choosing the colors to appear in your pattern, including choosing your own colors from the original image, choosing the number of colors you want to use and having the program choose the colors for you, and the option of choosing all of your colors to be colors actually available as floss. If you choose your colors and later decide you're unhappy with your choice, you can either simply choose again or you can edit your choices by hand in step 3.

2. Compare color choices active color compare icon

At this stage your original image has been transformed into a new image using your color choices. This step is used to compare your new image with the original image or with other color choices you have already made in order to decide which colors you'd like to move forward with. If you decide to change your choice simply go back to step 1 and try again.

3. Square your image and edit active square icon

Your colored image has now been transformed into a "squared" or "grided" image as in the final cross stitch pattern. Here you can edit your pattern by changing colors and freehand drawing until you're satisfied.

4. Create the pattern and edit active pattern icon

The squared color image has now had colors replaced with symbols, which you can change from among those available. When you're satisfied with the symbols, save your pattern to a pdf.

Moving Between the Stages

Each of the four stages has its own panel; to move between the panels (as they become available), you can either use the the sequence of four icons (shown above) that appears on the right side of the toolbar, or you can choose from the Windows menu. The current panel's icon will always appear highlighted with a green border and those that haven't been activated yet will appear grayed out.

Zooming

In all four stages, you can zoom in using the keyboard by holding down Ctrl and pressing the + key, or zoom out by holding down Ctrl and pressing the - key; you can also zoom at any time by holding down Ctrl and turning the mouse wheel.

The first three stages also provide two sets of icons for zooming operations. The first set appears on the toolbar (and also from the Image menu) and consists of a "Zoom in" option zoom in icon that increases the zoom by a fixed amount, a "Zoom out" option zoom out icon that decreases the zoom by a fixed amount, a "Zoom to width" option zoom to width icon that zooms the image to fit the available width, and a "Zoom to height" option zoom to height icon that zooms the image to fit the available height. (There's a caveat for square images - see this for details.)

The second set of zoom options is available from the Image menu and additionally consists of a "Zoom to fit" option zoom to image icon that zooms the image to be as large as possible and still fit in the available space, and an "Original size" option zoom to original icon that zooms the image to its original size.

In all stages the zoom level has no effect on processing.

Saving images

You can save the active image at any time as a jpg, png, pdf, or any of several other formats, by clicking on the save icon save image icon on the toolbar or by choosing Save Image from the File menu (not available from the first panel since the only image there is the original!).

Note: Saving an image does not allow you to restore that image after you've quit the program. For that, read on to the next section on saving projects.

Technical Note: Square and pattern images (from the square edit and pattern edit stages) are handled internally by this program in a way that makes it easy to zoom to very large sizes on screen without using many resources, but if you request to save such an image, then the program must request enough memory to hold the entire image all at once. At very large zoom levels this can require requesting and working with a gigabyte or more of memory which, depending on your computer's resources, could take anywhere from a couple of seconds to tens of minutes for your computer to process, leaving your computer bogged down in the meantime.

A warning message will appear if you attempt to save a large file, telling you how much memory will be required, and you can then decide whether to go ahead with the save or to cancel. To be safe, if you get such a warning and decide to save the image, you should first save your project.

Saving and restoring projects

You can save your work at any time by clicking on the save project icon save project icon on the toolbar or by choosing Save Project (or Save Project As) from the File menu. "Project" here refers to all of the images in all of the panels, as well as various settings in those panels. We reccomend saving your project with a .xst extension (myProject.xst, for example), but you can use any filename you'd like, with or without an extension.

To restore your work from a saved project file, just click on the open project icon open project icon on the toolbar, or choose Open Project from the File menu and open the project file you saved above, or look for your project under Recent projects in the File menu.

Note: The only image contained in a saved project file is the original image that started the project; all other images associated with the saved project are restored from the original when the project is reloaded. This keeps project files small and portable, but means longer load times spent regenerating images. (That means that if you've created images that you know you aren't going to use, it's best to delete them before saving your project.)

Note: The symbols used by this program come from fonts on your computer. Cstitch attempts to choose fonts on different computers in a consistent manner, but it's still possible that symbols could change if you save a project on one computer and then restore it on a different computer. In general this shouldn't be an issue if you're transferring projects between computers running some version of Windows, even if the versions of Windows are different.

Keyboard shortcuts

In addition to keyboard shortcuts listed in the menus, you can press "Ctrl+Enter" (i.e. hold down the control key and then press enter) at any time to process the current stage and move on to the next; you can also scroll horizontally on any image by holding down the Ctrl key and turning the mouse wheel. Other panel-specific keyboard shortcuts are listed here for the color compare panel, here for the square edit panel, and here for the pattern edit panel.

Panel specific help

Selecting "Help" from the Help menu will always display help for whichever of the four panels you're currently on.

The Color Choosing Panel active color chooser icon

Start a new project by opening a saved image from your files, either by clicking the folder icon open image icon on the toolbar, by choosing Open from the File menu, or by choosing an image from the Recent images section of the File menu.

The purpose of this first step is to reduce the number of colors in your image (typically hundreds of thousands) to a (typically much smaller!) selection of colors that you'd like to use as floss colors for the final pattern. The manner in which that is accomplished is determined by the "color selection mode", described next.

Choosing the Color Selection Mode

The color selection mode is chosen from the dropdown box on the toolbar. There are five modes to choose from:

Num colors to DMC [default]

In this mode the number of colors chosen is determined by two processes: user selection and program selection. User selection works by clicking on a color in the original image: the program will transform the clicked color into the closest matching DMC color and add the DMC color to the Clicked colors list on the right hand side of the window. The other color selection process is done by the program: set the number of DMC colors you would like the program to choose from the box to the right of the Color Selection Mode box.

The colors the program chooses are based on the frequency with which colors in the original image appear, so it's possible that small but important features (such as eye color, for example) may not have the desired color after this step (this program can't recognize features in your image, only colors). Such features can be corrected by hand in a later step. The program will choose its colors so that there is no overlap with any colors you choose by clicking. Thus the total number of colors chosen will be the sum of the user-clicked colors and the number of program-selected colors.

The program chooses its colors when you click on the Process button on the toolbar. The list of all colors chosen will appear to the right of the image at the next stage, or you can return to this stage at any time to see the list of program chosen colors in the Generated colors list to the right of the image.

Note: The major advantage of using the Num colors to DMC mode is that it is guaranteed to produce colors that are available as floss. The disadvantage is that the colors selected all come from the fixed pool of DMC colors (currently 454 colors). One consequence is that there may be no way to choose close shades of color from your original image unless similar close shades already exist as DMC colors. The Num colors mode below gets around that by allowing you to select exact colors from the original image (which may not be available as floss!).

Num colors to Anchor

This mode works exactly the same as the Num colors to DMC mode, except it creates Anchor colors instead of DMC colors.

Num colors

This mode is similar to Num colors to DMC mode, except that any color you click on will be added directly to the Clicked colors list without being transformed to a DMC color first, and the colors chosen by the program will all be colors actually occurring in the image.

While this mode will generally result in new images that match the original more closely than Num colors to DMC mode, the disadvantage is that the colors used to produce the new images may not be available as floss colors. Nonetheless, you may want to use this mode to produce an image to be used as the basis for adjusting the results of a DMC-mode image.

DMC

DMC mode will create a new image by replacing each color in your original image with the closest matching DMC color. This program is aware of 454 DMC color names, so depending on the variety of colors in your original image, this mode can create a new image with anywhere from 1 to 454 colors.

Anchor

Anchor mode works the same as DMC mode except that it creates Anchor colors instead of DMC colors.

Note: The colors produced in this step aren't guaranteed to be in the final image - chosen colors that appear relatively infrequently could be removed by further processing at a later stage.

Proceeding to the Color Compare Panel

After you have chosen the Color Selection Mode and your colors (or number of colors), click the Process button to continue to the next step, the Color Compare Panel. You can come back to this panel, change your selection mode, and click Process as many times as you want, and each processed image will be available in the next panel, where you can compare results.

Note: This color choosing step performs mostly automated color selection. A later step will allow for editing "by hand" to change/add/delete colors.

The Color Compare Panel active color compare icon

The color compare panel allows you to compare your new image with the original image and other images created from the Color Chooser Panel.

This panel can show two images side by side; to choose which image is shown on a given side, left or right, either choose from the appropriate pull-down list on the toolbar (labelled L: or R:), or choose from the list in the appropriate Left Image or Right Image menu. (You can't view the same image on both sides, so you will only be able to change a side if you have created more than one image from the Color Chooser Panel.)

Hiding and Showing Images

You can hide an image by unchecking the Show image box in the appropriate left or right image menu - hiding one image will give the other image as much room as possible. Recheck the box to reshow the image.

You can manually give one side of the viewer more room by dragging the middle bar of the viewer to one side or the other. To reset the bar to the center, click on Center splitter in the Image menu.

Deleting Images

If you choose Delete image from one of the image menus, the image cannot be recovered. You can't delete the original image.

Keyboard shortcuts

You can press "Shift + Left Arrow" (i.e. hold down the shift key and then press the left arrow key) to make the left image active, "Shift + Right Arrow" to make the right image active, "Shift + Up Arrow" to move up in the image list for the active side, and "Shift + Down Arrow" to move down in the image list for the active side. The same shortcuts apply in the square edit panel.

See the overview for application-wide keyboard shortcut information.

Dual Scrolling

By default, if scrollbars are necessary for your images, scrolling one side will automatically scroll the other side by the same amount. You can turn this behavior off or on by unchecking or checking the Dual scrolling box from the Image menu.

Dual Zooming

By default, zooming the active image will apply the same zooming to the inactive image. You can turn this behavior off or on by unchecking or checking the Dual zooming box from the Image menu.

Selecting the Squaring Parameters

The processing that occurs in this step turns a smoothly colored image into a "squared" image, as in the final pattern, where each square in the image has just one color. The manner in which the current image is tranformed into a squared/patterned image depends on the squaring mode and the square size setting.

The square size setting determines how large (in pixels) the squares to be created will be. The size is set using the number box on the toolbar, and is allowed to have any value from 1 to 50. The choice of square size, along with your choice of cross stitch fabric, will determine how large your final cross stitched piece will be - click on the Dimension Computer icon dimension computer icon on the toolbar to help you choose the correct square size based on your fabric type and your desired final dimensions.

The color that goes in a particular box of the pattern image (referred to as the representative color of that block below) is determined by the squaring mode, for which there are two possible values.

1. Median Mode [default]

Under median mode, roughly speaking, the representative color of a given block is chosen to be that color in the block that is "least far" in total from all of the other colors in the block. This can be thought of as choosing the "most representative" color in a given block, and generally gives the best results.

2. Mode Mode

Mode mode chooses the representative color of a given block to be the color that appears most often in that block.

Proceeding to the Square Editing Panel

Once you have chosen the squaring mode and square size, click on the image you wish to square to select it and then click the Square button on the toolbar, which will take you to the Square Editing Panel.

You can return to this panel, change your options, and click Square as many times as you like.

The Square Edit Panel active square icon

The square edit panel allows you to edit your pattern by changing colors and freehand drawing.

Square Pattern Editing Tools

This panel provides four tools for editing your pattern by hand.

Note: You can't edit the original image using these tools, but you can use the tools to choose colors from the original image.

Selection mode cursor icon

Click on the selection mode icon to be able to select an image with the mouse (if other tools are active, a mouse click may mean something else) - basically selection mode provides what you would think of as standard mouse behavior, as opposed to the other tools.

You can also select the left or right image at any time by using the left image button left image icon or the right image button right image icon on the toolbar.

The Change a Color Tool change all icon

Use this tool to change a color in your image. You can also change a color by right clicking on it at any time in the color list and choosing Change color.

The color to be changed to is displayed in a color swatch above the tools. You can set that color in any of four ways:

Once the swatch color has been set, left click on a color in the selected image to change it to the swatch color.

The Color Dialog

The color dialog offers multiple ways to choose a new color; you can alternate between the options using the menu in the lower left corner (depending on settings and situation some options may not be available).

The combo box below the tools can be used to restrict the type of colors that can be chosen using the color dialog: choose "DMC colors only" or "Anchor colors only" to restrict to colors of type DMC or Anchor, respectively.

Choose a Square Color

If the square you click on contains more than one color in the original image then this mode will allow you to choose from the colors from the original image in the clicked square.

If you're in DMC only or Anchor only mode then the colors from the original image are translated to DMC, respectively Anchor, colors before deciding whether or not this option is available.

Choose a color list color

Choose a color from those already present in the image. The original color clicked on is in the upper left hand corner and the rest of the colors are arranged by rows from nearest to furthest from the original color.

Choose a DMC floss by color

Choose a DMC floss by color/number

With these options you can choose any DMC color, either by color alone, or by color and the DMC floss number/description. For the colors only option, colors are arranged in the same manner as for the Choose a Color List Color option, while for the color/number option colors are arranged by floss number.

Choose an Anchor floss by color

Choose an Anchor floss by color/number

With these options you can choose any Anchor color, either by color alone, or by color and the Anchor floss number. For the colors only option, colors are arranged in the same manner as for the Choose a Color List Color option, while for the color/number option colors are arranged by floss number.

Choose From an Image

This option allows you to choose a color from any image currently on view in the main panel. The color block is arranged as follows: the large rectangle on the left is the original color, the upper right square is the most recently clicked color, and the lower right square is the color the mouse is currently over. Click on the new color you want from an image and then click the Accept button to confirm your choice - if you misclick simply click on a different color before hitting the Accept button.

If you're in DMC only or Anchor only mode then the upper right square will always be translated to a DMC or Anchor color, respectively.

Choose a New Color

Use this option to choose a color from a color palette or by providing an RGB or HSV value.

The Draw Tool draw icon

Use the draw tool to freehand draw on your image by holding down the left mouse button while dragging the mouse. The drawing color is displayed in the color swatch above the tools. You can set it as described under the Change a color tool directions.

The Fill Region Tool fill icon

Use the fill region tool to change the color of a specific region in the image by left clicking in the region. The new color is determined just as for the Change a color tool.

The Detail Tool detail icon

The detail tool is intended to be used to restore color to small detail areas of an image that may not have received adequate treatment from prior automated processing (the automated processing concentrates mostly on picking out the most prominent colors).

To use the tool, left click/drag on the selected image over the region you'd like to detail. As you drag, the squares under the mouse will be marked with xes. To unmark individual marked squares, right click/drag on the square(s), or click on the Clear button to clear all of the marked squares.
Note: The tool works best if you concentrate on individual features you'd like to restore, i.e. it's better to mark and detail many smaller regions of similar colors than to mark a single larger region with many mixed features/colors.

The Colors selection box determines the maximum number of colors that will be used to recolor the area that you've marked. Once you've marked an area and chosen the number of colors you'd like to use, click the Detail button. The new colors for the marked region will be chosen from the colors on the original image in that region, or DMC/Anchor versions of those colors if the DMC/Anchor colors only option is set.

Replace Rare Colors

Although this program makes an attempt to choose only colors that appear frequently in the original image, you may still wind up with several colors that appear in only a few squares in your square image. To replace such colors with colors that appear more frequently, choose Replace rare colors from the Image menu. The dialog that pops up allows you to define what “rare” means in the top line, and then lists the rare colors in the image along with the number of squares each occupies and what color (from among the “common” colors already in the image) it will be replaced with. Colors from rows that are unchecked will not be changed. Click “OK” to replace the checked colors. If you decide you don't like the result you can always undo your work (see below).

Note: Currently there is no way to change the color a rare color will be changed to. If you're unhappy with the program's choice, one alternate option is to uncheck that color in the dialog and then change it by hand using the Change a Color Tool.

Edit Undo/Redo

You can undo and redo your edits using the edit history buttons on the toolbar: undo left arrow icon and redo right arrow icon, or you can use the keyboard shortcuts "Ctrl + z" (undo) and "Ctrl + y" (redo). Your edits are saved when you save your project.

Gridding and grid color

By default all pattern images in this panel have grid lines in black. You can turn off the grid lines by either clicking the gridlines button grid icon on the toolbar or by toggling the Grid menu option in the Image menu.

In addition you can change the grid color by selecting Change grid color from the Image menu.

Grid changes apply to all images simultaneously (so, for example, you can't turn on the grid on the left image and turn it off on the right image).

Keyboard shortcuts

You can press "Shift + Left Arrow" (i.e. hold down the shift key and then press the left arrow key) to make the left image active, "Shift + Right Arrow" to make the right image active, "Shift + Up Arrow" to move up in the image list for the active side, and "Shift + Down Arrow" to move down in the image list for the active side. The same shortcuts apply in the color compare panel.

You can also press "Ctrl + z" to undo one edit and "Ctrl + y" to redo one edit.

See the overview for application-wide keyboard shortcut information.

Hiding, Showing, and Deleting Images; Dual Scrolling and Dual zooming

Hiding and showing images, deleting images, and dual scrolling and dual zooming work the same as they do for the Color Compare Panel.

Zoom to fit, zoom to width, and zoom to height for square images

Zoom to fit, zoom to width, and zoom to height may not perform quite as expected for square images. For the semi-technical reason, read on.

If a square image is 10 squares wide, then the pixel width of that image can only ever be a multiple of 10 pixels. For example, if each square is 2 pixels wide then the image will be 10*2 = 20 pixels wide, or if each square is 5 pixels wide then the image will be 10*5 = 50 pixels wide, etc. If the width available to display that square image is 58 pixels, the program will display the image using the largest square size that won't make the resulting image wider than 58 pixels, which in this case means the square image will be scaled to be 50 pixels wide (leaving a gap of 8 pixels). The same rule applies to heights.

So square images may appear smaller than you expect them too - if you really want them larger you can always zoom in.

Proceeding to the Symbol Editing Panel

Once satisfied with the pattern, click on the image you wish to proceed with to select it (first choosing the Select tool if necessary) and then click the Pattern button on the toolbar, which will take you to the Symbol Editing Panel.

You can return to this panel, change your options, and click Pattern as many times as you like.

The Pattern Edit Panel active pattern icon

The pattern edit panel allows you to change color symbols and to save your pattern as a pdf.

Note: The pattern view shows a border around each symbol filled with the color of the corresponding square - by default that color border will not appear in the final pdf version of the pattern, but the save options allow you to set a color border for squares in the pdf if you so desire.

Note: The program will attempt to find a program on your system to automatically view your pdf pattern each time you save. If you'd prefer to save without viewing, or if you want to view the pdf but no viewer is loaded after you save a pdf pattern, or if you'd like to use a different viewer, then change the viewer settings under Set pdf viewer in the Help menu (only available in the Pattern Edit Panel).

The final pdf includes a title page showing the original image and the square colored image, then a table illustrating how to piece together the pattern pages, then a list of symbol/color associations, then the pattern itself. Any DMC colors are listed with their DMC name and code; Anchor colors are listed with their anchor code and the code/name of the nearest DMC color; for all other colors the code is the RGB value of the color and the name is the code/name of the nearest DMC color. The count column lists the number of times a given color is used in the pattern.

Choosing Your Image

If you have created more than one symboled image (by clicking the Pattern button on the square edit panel more than once), you can switch between your images by either selecting the desired image from the pulldown menu on the toolbar or by choosing it from the list in the Images menu.

Switching Between the Square and Symbol Views

To situate yourself on the symbol image, you can switch back and forth between the symbol and square color views by clicking the right button on the image or by clicking the Switch Views button switch images icon on the toolbar.

Using the image previewer

Because of the high zoom levels needed to be able to read pattern symbols on the image, typically only a small portion of the symbol image will be viewable at any one time. To help orient yourself and browse around the image you can use the image previewer in the upper right corner of the screen. It provides a smaller view of the entire image with a red rectangle outlining the area of the symbol image currently being viewed. You can move the rectangle, and hence the region of the symbol image being viewed, by clicking and/or dragging on the preview image. To switch between viewing the original image and the squared image in the preview area, right click anywhere on the preview image.

Changing a symbol

To change the symbol used for a given color, you can either click on the symbol on the image or right click on the symbol in the symbol list and choose Change symbol. In either case you can choose a new symbol from the symbol selection dialog, which allows you to select from all remaining available symbols.

Note: The symbols used by this program come from fonts on your computer. Cstitch attempts to choose fonts on different computers in a consistent manner, but it's still possible that symbols could change if you save a project on one computer and then restore it on a different computer. In general this shouldn't be an issue if you're transferring projects between computers running some version of Windows, even if the versions of Windows are different.

Saving a Pattern to a Pdf File

To save your pattern to a pdf, click the To pdf button on the toolbar. Before your pattern is saved you'll have the opportunity to:

Keyboard shortcuts

You can press "Shift + Up Arrow" (i.e. hold down the shift key and then press the up arrow) to move up in the image list and "Shift + Down Arrow" to move down in the image list. The same shortcuts apply in the color compare and square edit panels.

You can also press "Ctrl + z" to undo one edit and "Ctrl + y" to redo one edit.

See the overview for application-wide keyboard shortcut information.

Gridding and grid color

Gridding and grid color are controlled just as for the square edit panel.