It is currently 19 Jan 2018, 21:31

GIMP Python Fu ScriptsReplace Colors Using Template Script for GIMP (Showcase | Slideshow)

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

Administrator
View: Showcase | Slideshow
Topic Posts: 1/1
Posts: 2066
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,105.47 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 1104
x 237
Contact:
Canada

Replace Colors Using Template Script for GIMP

Post#1 by tim » 07 Oct 2017, 13:26


This script was created to aid with this question: Change Entire Palette to lessen workload on reddit
Problem: you have an image (to be changed) and a template defining the colors (you want to change to).

:download:
replace_colors_using_template.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(1.93 KiB) Downloaded 16 times
Script Menu Location: Python-Fu/Replace colors using template

Instructions:
1. Have your image that you'd like to change palette of.
2. Then add a layer that contains your template (this layer must be renamed to "template") that contains colors you'd like to change to.
3. Image must be in RGB mode.
4. All layers must be the same as image size.
5. Select the layer that you'd like to change colors of (layer in step 1).
6. Make a Selection of area of the template that you'd like the script to scan and change colors based on.
7. Run script (Python-fu/Replace colors using template).

Here are sample .xcfs files so that you can see how they're set up before running script (which you can run scripts on).
one.xcf #
(9.89 KiB) Downloaded 9 times
two.xcf #
(9.35 KiB) Downloaded 8 times
three.xcf #
(9.22 KiB) Downloaded 8 times
Here are sample results of what the script generates with above templates:
one_replaced_colors_using_template.png
one_replaced_colors_using_template.png # (698 Bytes) Viewed 200 times (Watermarked | Thumbnail)
two_replaced_colors_using_template.png
two_replaced_colors_using_template.png # (700 Bytes) Viewed 200 times (Watermarked | Thumbnail)
three_replaced_colors_using_template.png
three_replaced_colors_using_template.png # (687 Bytes) Viewed 200 times (Watermarked | Thumbnail)
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (27), User avatar gnerd (3), User avatar Pat625 (3), User avatar Issabella (2), User avatar RJKD (1)

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

Who is online

Users browsing this forum: No registered users and 1 guest