name: stitchify description: Turn the user's own photo (pet, trip, portrait) into a counted cross-stitch pattern with real DMC threads: printable A4 PDF chart, stitched preview, thread key with skeins. Use when asked for a cross-stitch, embroidery or DMC pattern, or /stitchify.
What does Cross-Stitch from a Photo do?
Converts a photo into a cross-stitch pattern with scripts/stitchify.py (Python 3, Pillow, NumPy).
Steps
- Find the user's image. Copy it to the working directory if the original is read-only.
- Make sure the dependencies exist:
pip install pillow numpy(add--break-system-packagesif pip asks). - Run:
python scripts/stitchify.py INPUT -o stitchify_outand add options from what the user said (below). - Look at
NAME_preview.pngbefore sending. If faces or key details are lost, rerun with more colours or a larger--width. If the image is washed out, raise--sator--contrast. - Send back:
NAME_preview.pngfirst (the stitched look), thenNAME_pattern.pdf(the printable pattern),NAME_key.pngandNAME_pattern.png. Tell the user the stitch count, finished size on their fabric and number of colours. Offer one tweak in a line: bigger or smaller, more or fewer colours, backstitch outline, dithering.
Options
| Flag | Use |
|---|---|
--width N | Stitches across (default 80). 50 = small and quick, 120+ = detailed, many pages |
--colors N | Maximum DMC colours (default 20, max 40). 12 for beginners, 30+ for portraits |
--fabric 14|16|18 | Aida count, sets the finished size in cm and inches (default 14) |
--dither | Floyd-Steinberg dithering with the chosen threads only. Adds texture to gradients, but means many single stitches of different colours. Not for beginners |
--backstitch | Dark outline along strong edges (needs one extra thread). Good for pets, mugs, logos |
--sat, --contrast | Adjust before matching (defaults 1.15, 1.05) |
--title TEXT | Title printed on the PDF |
--no-pdf | Skip the PDF |
Answer the user's questions with the printed figures: finished size, stitches per colour, skeins. Pattern size is width / fabric count inches; the PDF cover also says how big to cut the fabric (finished size plus 5 cm each side).
Notes
- Photos with a busy background look better cropped to the subject first, or with
--colors 24or more. - Thread colours come from a built-in DMC table matched in CIEDE2000. Screen RGB for threads is approximate: tell the user to compare with a physical shade card before buying a large project.
- The PDF is A4. Big patterns are split into pages; each page repeats 2 stitches of its neighbours beyond a red dashed line. Bold lines every 10 stitches, numbered rows and columns.
- Skeins assume 2 strands of 6-strand floss over one aida square plus about 25% waste.
If the script is missing
git clone --depth 1 https://github.com/thibaud360/stitchify /tmp/stitchify and use /tmp/stitchify/skills/stitchify/scripts/stitchify.py.