It is currently 21 Jan 2018, 06:31

GIMP Python Fu ScriptsGenerate Cross Stitch Pattern and Manually match RGB with DMC colors Scripts for GIMP (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 2/2
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 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 1106
x 240
Contact:
Canada

Generate Cross Stitch Pattern and Manually match RGB with DMC colors Scripts for GIMP

Post#1 by tim » 24 Mar 2017, 14:08


This is for people who are picky/choosy with their cross-stitching colors and want to manually pick each color for best results, because sometimes mathematically, the closest color returned isn't as good as a color manually selected by eyeing which might have mathematical distance further away but looks better. Enjoy people. I'd love to know how useful this is so feel free to leave a message or share your real life cross-stitches results in this thread.

There are two GIMP .py scripts involved in this process and a Codeskulptor program (to be performed in the middle).
Note: VERSION 2 of these scripts available near bottom of this post which allows you the ability to rerun 2nd script to make possible changes to DMC codes multiple times.
:download:
cross_stitch_manual_tt.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(10.23 KiB) Downloaded 49 times
Menu location: Python-Fu/Cross Stitch Manual...

:download:
cross_stitch_DMC_replace_color.py #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(27.13 KiB) Downloaded 48 times
Menu location: Python-Fu/Cross Stitch DMC replace color

Codeskulptor program used for manual matching colors found here --> viewtopic.php?f=5&t=518

Instructions:
1. Run "Cross Stitch Manual" script on an active layer.
2. Using Codeskulptor program, Manually rename the symbols layers (created in Image created by step 1) to have a space then DMC code at the end.
3. Run "Cross Stitch DMC replace color" script (after having all the symbols layers renamed to contain the the DMC codes to replace with).
4. You'll get an extra image with DMC thread information that says whatever DMC replaced whatever RGB values/colors which you can then take along with you to the thread store to buy threads.

Please see this video for a walk through of how to use these .py plug-ins and Codeskulptor program.

Original image.
gimp.png
gimp.png # (133.4 KiB) Viewed 540 times (Watermarked | Thumbnail)
Here's a comparison of reduced colors by GIMP before and after Manually matching DMC colors (On the left is the pattern that has no DMC colors yet, on the right is after we've replaced with DMC colors manually).
gimp_cross_stitch_manual_method_comparison.jpg
gimp_cross_stitch_manual_method_comparison.jpg # (201.92 KiB) Viewed 540 times (Watermarked | Thumbnail)
Here's the cross-stitch pattern with white layer turned on so we can see black symbols on close to black background.
gimp_cross_stitch_manually_DMC_tweak_pattern.jpg
gimp_cross_stitch_manually_DMC_tweak_pattern.jpg # (1.45 MiB) Viewed 540 times (Watermarked | Thumbnail)
Here's the thread info after runnning "Cross Stitch DMC replace color".
gimp_cross_stitch_manual_DMC_thread_info.jpg
gimp_cross_stitch_manual_DMC_thread_info.jpg # (49.54 KiB) Viewed 540 times (Watermarked | Thumbnail)
If you're not too picky about being able to manually pick each DMC color and just want a quick dirty auto method where it replaces the colors for you: viewtopic.php?f=3&t=519
---------------------------------------------------------------------------------------------------------
VERSION 2
---------------------------------------------------------------------------------------------------------
Version 2 of scripts allows you to be able to go back and change one (or more DMC codes as part of the layer names) and rerun "Cross Stitch DMC replace color" script
:download:
cross_stitch_manual_tt (2).zip #
unzip put in your GIMP's /plug-ins/ folder
(10.33 KiB) Downloaded 27 times
:download:
cross_stitch_DMC_replace_color (2).zip #
unzip put in your GIMP's /plug-ins/ folder
(8.92 KiB) Downloaded 30 times
Note: these versions work together (so if you get version 2 you must get both version 2 of these scripts. Technically, version 2 of "Cross Stitch Manual" saves symbols selections to channels and version 2 of "Cross Stitch Replace DMC Colors" uses these channels to select and replace DMC colors.
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 2/2
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 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 1106
x 240
Contact:
Canada

Post#2 by tim » 25 Mar 2017, 21:32


About printing this large CS pattern. You could export the image (after flattening it, or edit the white layer to be full opacity so that you just see pattern and no colors it's really up to you) as a .pdf file from GIMP.
Then open it up in Acrobat Reader (except version 9), you can print it as a poster and it will print multiple pages that you could piece/tape together to form a large poster like print.

Also I don't have a printer to test but I downloaded Acrobat Reader 11 (it's FREE). The image looks a little too large.
Before exporting to pdf. Inside GIMP, under menu Image -> Print Size, set X resolution and Y resolution to be about 187 pixels/in then it looks alright when exporting to pdf and print as poster. The sample takes up 4 regular (8.5" x 11") sheets of paper.

Here's my sample pdf export (after setting Image -> Print Size -> Set Xresolution and Y resolution to be about 187 pixels/in)
gimp_cs_pattern.pdf #
(275.81 KiB) Downloaded 28 times
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (1), User avatar gnerd (3)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Issabella
2: Issabella
3: Conbagui
4: tim
5: Ella
6: Pat625
7: oldmangrumpy

Who is online

Users browsing this forum: No registered users and 1 guest