It is currently 18 Jan 2018, 01:27

GIMP Python Fu ScriptsGenerate Cross Stitch pattern and DMC thread information Script for GIMP (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 5/9
Posts: 2058
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,937.46 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1092
x 236
Contact:
Canada

Generate Cross Stitch pattern and DMC thread information Script for GIMP

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


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.

:download:
cross_stitch_tt.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(10.2 KiB) Downloaded 130 times
:download:
cross_stitch_tt (2).zip #
version 2 (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 99 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 --> viewtopic.php?f=3&t=520)

Script Menu location: Python-Fu/Cross Stitch...

Script Options
gimp_cross_stitch_options.jpg
gimp_cross_stitch_options.jpg # (111.77 KiB) Viewed 1451 times (Watermarked | Thumbnail)
Instructions:
1. Open up any image, with an active/selected layer.
2. Run Script. 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 1451 times (Watermarked | Thumbnail)
Sample cross stitched pattern
gimp_cross_stitch_pattern.jpg
gimp_cross_stitch_pattern.jpg # (3 MiB) Viewed 1451 times (Watermarked | Thumbnail)
Sample thread info image
gimp_cross_stitch_thread_info.jpg
gimp_cross_stitch_thread_info.jpg # (91.21 KiB) Viewed 1451 times (Watermarked | Thumbnail)
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 1451 times (Watermarked | Thumbnail)
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 1450 times (Watermarked | Thumbnail)
Video clip of me using the script in GIMP


While on cross-stitching related topic, you might be interested in 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: viewtopic.php?f=3&t=520
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
Pat625
Script Tester
View: Showcase | Slideshow
Topic Posts: 1/9
Posts: 2031
Joined: 27 Sep 2016, 20:35
Cash on hand: 11,891.58 GLP
Gender: Gal
Location: USA
Operating System: Windows
GIMP Version: 2.8.22
x 7
x 426
United States of America

Post#2 by Pat625 » 24 Mar 2017, 17: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.
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 5/9
Posts: 2058
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,937.46 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1092
x 236
Contact:
Canada

Post#3 by tim » 26 Mar 2017, 09: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)
.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Issabella
Script Tester
View: Showcase | Slideshow
Topic Posts: 1/9
Posts: 1773
Joined: 19 Jan 2017, 03:42
Cash on hand: 13,707.56 GLP
Gender: Gal
Operating System: Windows
x 208
x 459
Spain

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


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



Issabella

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 5/9
Posts: 2058
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,937.46 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1092
x 236
Contact:
Canada

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


0 x



aka Tin
Image gimplearn.net                                              

No avatar
berserker
Forum Member
View: Showcase | Slideshow
Topic Posts: 2/9
Posts: 2
Joined: 08 May 2017, 21:31
Cash on hand: 50.00 GLP
Gimp Nation

Post#6 by berserker » 08 May 2017, 21: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
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 5/9
Posts: 2058
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,937.46 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1092
x 236
Contact:
Canada

Post#7 by tim » 08 May 2017, 22:36


I think if you're on linux you have to make the .py executable.
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

User avatar Conbagui (1), User avatar tim (8), User avatar gnerd (2), User avatar Pat625 (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Issabella
2: Pat625
3: trandoductin
4: animicule
5: gnerd
6: Issabella
7: dinasset

Who is online

Users browsing this forum: No registered users and 2 guests