Someone on an email list I belong to asked about ways of making a counted cross-stitch pattern from a photo. There are commercial packages that do this, but it seemed like something GIMP could do, and I wanted some Python practice.
Attached is a zip file containing the following files:
I used the Photoshop tutorial found here as my starting point. The script performs the following operations:
It appears in the menus under Filters > Decor > Cross-stitchify... It takes quite some time to run as I need to iterate through each tile of the image twice, and any interruption during the label phase can crash the script, but the output is quite good. The entire image can be printed for use as the pattern, or just the grid if printing in B&W.
UPDATE: version 2.0 - added creation of text file with list of what colour floss, and how many stitches of each, are used. Also allowed for greater range of mosaic sizes to accommodate wider range of images.
UPDATE: version 2.1 - added OS check: win32 opens text file, other OS displays message with path to file.
| Attachment | Size |
|---|---|
| cross-stitchify_v2_1.zip | 15.03 KB |
Comments
Long Time
Wow, it's been a while since I looked at this. can't promise I will be making any changes to this any time soon, but I like the ideas you present here.
symbol instead of number
My wife loves this - no other cross stitch app. for ubuntu gnome (there is a KDE app - kxstitch - but many problems compiling on gnome, so:
How about changing the floss colour number to show a symbol, anything from standard fonts would do - letters, etc., with a listing of symbol to floss number. This would be more like regular cross stitch applications and allow easier reading of final chart, and maybe allow smaller mosaic size without losing readability.
Also, one of the older posts here - being able to limit the palette size would make this really useable - haven't seen any further work on this - is it a possibility? I would love to but know absolutlely nothing about computers except as a "normal"user.
Thanks
Where to load?
Also: floss.html = red herring
Some Helpful Info
How to use?
Interesting Idea
Another error?
Kind of answered my own question
Updated
Thanks for the follow-up
What version of the gimp did
Hmmm...
Image size issue debugged
#resize layer shrinking mosaic=5 to run faster #mosaicModified = 5 / theMosaic #my fix mosaicModified = float(5) / (float(theMosaic)) print "Mod Mosaic = %d" % mosaicModified widthNew = widthOld * mosaicModified heightNew = heightOld * mosaicModifiedI have been running with the cast operators just fine.Possible enhance
Excellent idea
Home palette