It is currently 25 Nov 2020, 17:10

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Generate Cross Stitch pattern and DMC thread information Script for GIMP

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger

Generate Cross Stitch pattern and DMC thread information Script for GIMP

Post#1 by tim » 23 Mar 2017, 21:03


Generate Cross-Stitch Pattern GIMP 2 Banner/

With the below script, you can generate your own cross-stitch patterns for free (in GIMP).

I was watching people cross stitching on twitch.com and decided to do a plug-in/script for people to use to cross-stitch.
Use this as an alternative of programs like Winstitch (if you can't afford it). Hope you guys like it. If you find it useful, I'd love to hear from you about it. Also there's a Beads pattern script which is an a variation from this script intended for perlers.

Download
cross_stitch_tt.zip
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder) (GIMP 2.8)
(10.2 KiB) Downloaded 724 times
Download
cross_stitch_tt (2).zip
version 2 (GIMP 2.8) (saves each thread selection to channels, so that we are able to run "Cross Stitch DMC replace colors" script after adding DMC code to end of layer names) So that the process is still automatic but can manually change one or more colors afterwards.
(10.34 KiB) Downloaded 551 times
(for version 2, if you wish to manually change one or more DMC colors after the automatic process, you can use "Cross Stitch DMC replace color" script found here --> http://gimplearn.net/viewtopic.php?f=3&t=520)
cross_stitch_tt(2.5).zip
version 2.5 - Added Delta-E color matching method (GIMP 2.8) Delta-E is based on Human Vision Perception so it's superior to other methods of matching colors
(10.8 KiB) Downloaded 259 times
cross_stitch_tt(2.6).zip
version 2.6 - for GIMP 2.8 Added stitch count to thread info (requested by yellowzip)
(11.01 KiB) Downloaded 216 times
cross_stitch_tt(3).zip
version 3 - Scripted and Tested for GIMP 2.10 (Tested on Linux [Ubuntu] GIMP flatpak installation)
(10.61 KiB) Downloaded 330 times
cross_stitch_tt(4).zip
version 4 - Added Delta-E color matching method (GIMP 2.10) Delta-E is based on Human Vision Perception so it's superior to other methods of matching colors
(11.17 KiB) Downloaded 498 times
cross_stitch_tt(5).zip
version 5 - for GIMP 2.10.X Added stitch count to thread info (requested by yellowzip)
(11.3 KiB) Downloaded 316 times
cross_stitch_tt.py
version 6 - for GIMP 2.10.X. Converted from UTF-8-BOM to UTF-8 encoding so that it would run on Windows.
(35.67 KiB) Downloaded 286 times
cross_stitch_tt.py
version 7 - for GIMP 2.10.X. Use symbols instead of Hex Digits. Looks nicer and easier to identify symbols.
(37.22 KiB) Downloaded 162 times
cross_stitch_tt.py
version 8 - for GIMP 2.10.X. Outputs dimension of pattern at bottom Thread Info image (for reference later).
(37.74 KiB) Downloaded 150 times
cross_stitch_tt.py
version 9 - for GIMP 2.10.X. Fix total stitch count.
(37.89 KiB) Downloaded 149 times
cross_stitch_tt.py
version 10 - for GIMP 2.10.X. Print out sizes in inches and centimeters on for aida 14,16 and 18 count (at bottom of thread info image)
(39.6 KiB) Downloaded 154 times
cross_stitch_tt.py
version 11 - for GIMP 2.10.X. Added interpolation option for scaling (as sometimes "None" looks better than "Cubic" depending on image/taste).
(39.87 KiB) Downloaded 169 times
cross_stitch_tt.py
version 13 - for GIMP 2.10.X. Some enhancement and fix of blank 15th symbol.
(43.05 KiB) Downloaded 159 times
cross_stitch_tt.py
version 14 - for GIMP 2.10.X. Fixed centimeter size estimation bug.
(43.08 KiB) Downloaded 210 times
cross_stitch_tt.py
version 15 - for GIMP 2.10.X Replace blank symbols with visible symbols bug fix.
(43.13 KiB) Downloaded 491 times
cross_stitch_tt.py
version 16 - for GIMP 2.10.X Added Option to YES/NO to blending. Blending uses average colors of combination of 2 thread colors. Slower but could in theory by law of averages produce better matching colors.
(44.08 KiB) Downloaded 44 times
cross_stitch_tt.py
version 17 - gor GIMP 2.10.X Limit blending colors to close colors producing superior/convincing blending colors. And this version also shows for Thread Info image, DMC thread color for blended colors as 2 actual DMC colors instead of the fictional average color.
(45.55 KiB) Downloaded 52 times
cross_stitch_tt.py
version 18 - for GIMP 2.10.X added option to select "Third Blend" which uses combinations of 3 strands (1 strand of one color combined with 2 strands of another color).
(48.21 KiB) Downloaded 49 times
cross_stitch_tt.py
version 19 - For GIMP 2.10.X added 35 new DMC colors (DMC 1-35)
(49.58 KiB) Downloaded 48 times
cross_stitch_tt.py
version 20 - For GIMP 2.10.X Added "4th Blend" (4 strands of 2-color-combinations).
(52.93 KiB) Downloaded 47 times
cross_stitch_tt.py
version 21 - For GIMP 2.10.X Added "5th Blend" and "6th Blend" for 5-strand and 6 strand blends.
(59.4 KiB) Downloaded 158 times
cross_stitch_tt.py
version 22: Output to console unique list of DMCs (even of blends). DMCs list is used to add pattern to cs-pattern.com's database.
(59.64 KiB) Downloaded 23 times
Script Menu location: Python-Fu/Cross Stitch...
If you do cross-stitching, consider joining us on our new forum on cs-pattern.com

Script Options
gimp_cross_stitch_options.jpg
gimp_cross_stitch_options.jpg (111.77 KiB) Viewed 17048 times
Instructions:
1. Open up any image, with an active/selected layer.
2. Run Script (Python-Fu/Cross Stitch..). Adjust options.
3. Wait for script to run (it'll show progress bar).
4. After script is done you should see 2 new images (1 is the cross-stitch pattern, the other is DMC thread information [also used to name the layers in the cross-stitch pattern image).
5. Enjoy cross-stitching! If it works for you, I'd love to see your final real life cross-stitches (share on this thread if you'd like).

Sample original:
gimp.png
gimp.png (133.4 KiB) Viewed 17048 times
Sample cross stitched pattern
gimp_cross_stitch_pattern.jpg
gimp_cross_stitch_pattern.jpg (3 MiB) Viewed 17048 times
Sample thread info image
gimp_cross_stitch_thread_info.jpg
gimp_cross_stitch_thread_info.jpg (91.21 KiB) Viewed 17048 times
Screen shot of viewing cross-stitch pattern while in GIMP.
gimp_cross_stitch_pattern_screenshot.jpg
gimp_cross_stitch_pattern_screenshot.jpg (857.5 KiB) Viewed 17048 times
Note: there was a white layer of 30 opacity added over top of stitch pattern to allow stitch symbols to be visible (even when over black). If you wish you could toggle this layer's visibility off.
Sample pattern with white layer turned off.
gimp_cross_stitch_pattern_with_white_layer_turned_off.jpg
gimp_cross_stitch_pattern_with_white_layer_turned_off.jpg (3.06 MiB) Viewed 17047 times
Video clip of me using the script in GIMP


GIMP 2.10 screenshot (version 3 of script)
2_10_screenshot_of_cross_stitch_tt_run.jpg
2_10_screenshot_of_cross_stitch_tt_run.jpg (96.41 KiB) Viewed 14898 times
While on cross-stitching related topic, you might be interested in http://gimplearn.net/viewtopic.php?f=5&t=518&p=3347
Or if you want to be able to manually choose your DMC for each color instead of this automatic method: http://gimplearn.net/viewtopic.php?f=3&t=520

This plug-in was
  • shared on pclinuxos.com by TN_Tux
[/list]
aka Tin

         

Pat625
Tutorial Creator

Post#2 by Pat625 » 25 Mar 2017, 00:42


That looks like a really neat script, Tin! I did not get into cross stitching as never really had time for it. However, If I ever do, I'll remember your script for certain.

tim
GL Blogger

Post#3 by tim » 26 Mar 2017, 16:08


LadyAshleen on twitch said that right off the bat, she would suggest that she wants the ability to change individual pixels.
As GIMP is already a great image editor, this script is meant to be run on an already finished image so any edits should be done before using script.

I suggested that what she should do is before generating the cross stitch pattern:
  • Edit/Work on her image as pixel art. Like for example if she wants a stitch pattern that is 100 stiches wide, she should edit scale the image down/up to 100 pixel wide
  • Then Image->Mode->Indexed (enter number of colors she wants).
  • Continue to work in indexed mode as pixel art (zoomed in)
  • Then once she's happy, she can convert it back to RGB mode by going Image->Mode->RGB
  • Now that the image is ready, run script to generate cross stitch pattern (on this ready result)
.
aka Tin

         

Issabella
Script Tester

Post#4 by Issabella » 27 Mar 2017, 13:57


Tin, you have created a very useful great filter. I love it. :yay_yay_purple: :gimp_clap:
Issabella

Don’t be afraid to start over. It’s a new chance to rebuild what you want.

tim
GL Blogger

Post#5 by tim » 30 Mar 2017, 16:46


aka Tin

         

berserker
Forum Member

Post#6 by berserker » 09 May 2017, 04:41


Hi
I just downloaded your script and placed in the plug-ins directory for GIMP(2.8), but it is not showing up in the menus( after restarting GIMP).
Before I go off poking around in the code, are you aware of any problems/solutions?

I'm using OSX 10.12.4 and GIMP 2.8 and have the script at ~/Library/Application Support/GIMP/2.8/plug-ins/

Cheers
GIMP Learn rocks...

tim
GL Blogger

Post#7 by tim » 09 May 2017, 05:36


I think if you're on linux you have to make the .py executable.
aka Tin

         

berserker
Forum Member

Post#8 by berserker » 09 May 2017, 06:53


The file was defaulted to executable
-rwxr-xr-x@ 1 xxxxx staff 33250 9 May 14:08 cross_stitch_tt.py

I might have to go get my shovel!
Thanks for getting back to me.
GIMP Learn rocks...

tim
GL Blogger

Post#9 by tim » 09 May 2017, 14:37


have you used .py scripts before this one?
You should try putting in your user's GIMP's plug-ins folder.
aka Tin

         

tim
GL Blogger

Post#10 by tim » 09 Jun 2018, 04:29


A new member (wyh) tried this script and mentioned that it did not work with GIMP 2.10.
So I have just updated 1st post with version 3 of script which works on 2.10.
Thanks wyh! And Welcome to GIMP LEARN forum!
aka Tin

         


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 21 guests