CommunityImagegithub.com

Cross-Stitch from a Photo

Turn a photo of a pet, a trip, or a portrait into a counted cross-stitch chart with real DMC thread colors, a stitched preview, and a printable pattern.

What is Cross-Stitch from a Photo?

A photo-to-pattern skill that outputs a stitch chart a person can actually sew, not a filtered picture of stitching.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/thibaud360/stitchify/tree/HEAD/skills/stitchify

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation


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

  1. Find the user's image. Copy it to the working directory if the original is read-only.
  2. Make sure the dependencies exist: pip install pillow numpy (add --break-system-packages if pip asks).
  3. Run: python scripts/stitchify.py INPUT -o stitchify_out and add options from what the user said (below).
  4. Look at NAME_preview.png before sending. If faces or key details are lost, rerun with more colours or a larger --width. If the image is washed out, raise --sat or --contrast.
  5. Send back: NAME_preview.png first (the stitched look), then NAME_pattern.pdf (the printable pattern), NAME_key.png and NAME_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

FlagUse
--width NStitches across (default 80). 50 = small and quick, 120+ = detailed, many pages
--colors NMaximum DMC colours (default 20, max 40). 12 for beginners, 30+ for portraits
--fabric 14|16|18Aida count, sets the finished size in cm and inches (default 14)
--ditherFloyd-Steinberg dithering with the chosen threads only. Adds texture to gradients, but means many single stitches of different colours. Not for beginners
--backstitchDark outline along strong edges (needs one extra thread). Good for pets, mugs, logos
--sat, --contrastAdjust before matching (defaults 1.15, 1.05)
--title TEXTTitle printed on the PDF
--no-pdfSkip 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 24 or 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.

Related Skills