It is currently 17 Oct 2021, 09:06

• 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
Sponsored content for World Food Program

Sample Color Border Plug-in

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger
1st Place
5539 Post(s)

Sample Color Border Plug-in

Post#1 by tim » 02 Mar 2019, 22:45


This one is simple but very fun (I think).
It turns your active layer into indexed mode then samples the colors (number of colors specified by you).
Then uses those colors to draw a border frame of a specified dimensions (percentage also specified by you).

This one came to me, when I was pondering about the Color Chips Plug-in, since that one doesn't have much use, I thought "What if I create a border out of color chips?" and so this plug-in was born.

You might also be interested in the Perspective Border Plug-in.
sample_color_border.py #
Tested on GIMP 2.10.8 flatpak Linux (Ubuntu).
(4.43 KiB) Downloaded 196 times
sample_color_border.py #
Version 2. Improve Quality by creating large borders then scaled down. Added Toggle for keeping aspect ratio of border or not to have constant border thickness.
(6.74 KiB) Downloaded 279 times
Plug-in Menu Location: Python-Fu/Sample Color Border...

Instructions:
  1. Have an image of active layer that you'd like to border.
  2. Run Plug-in (Python-Fu/Sample Color Border...), Select Number of Colors, Select Percentage to use as Frame (ie, 10% would make the final image 10% larger in dimensions). Click OK to run Plug-in.
  3. That's it, Enjoy!

    Some sample results (before on left, after on right):
    sample_color_border.png
    sample_color_border.png # (123.46 KiB) Viewed 5298 times (Thumbnail | Recognize | Sq Tile | LNFI)
    sample_color_border_2.png
    sample_color_border_2.png # (548.67 KiB) Viewed 5298 times (Thumbnail | Recognize | Sq Tile | LNFI)
    sample_color_border_3_60percent.png
    sample_color_border_3_60percent.png # (523.81 KiB) Viewed 5297 times (Thumbnail | Recognize | Sq Tile | LNFI)
    I am quite happy with this plug-in. I shall celebrate by eating 3 bananas and a bunch of grapes :D
aka Tin
World Food Program | Good Deeds Forum

         

Pat625
Tutorial Creator
2nd Place
4507 Post(s)

Post#2 by Pat625 » 03 Mar 2019, 01:15


Tin, this is really another really nifty plug-in!! So nice to do a border quickly that has colors that are from and compliment the image. I will use this one a lot!!
Tin Tran.Sample Border.Ram Statue.jpg
Tin Tran.Sample Border.Ram Statue.jpg # (114.45 KiB) Viewed 5277 times (Thumbnail | Recognize | Sq Tile | LNFI)
Tin Tran.Sample Border.Forest.jpg
Tin Tran.Sample Border.Forest.jpg # (611.05 KiB) Viewed 5277 times (Thumbnail | Recognize | Sq Tile | LNFI)
Tin Tran.Sample Border.Art School Athen.Painter Rafael.jpg
Tin Tran.Sample Border.Art School Athen.Painter Rafael.jpg # (123.5 KiB) Viewed 5277 times (Thumbnail | Recognize | Sq Tile | LNFI)

FlutteringBy
Forum Member
26th Place
81 Post(s)

Post#3 by FlutteringBy » 03 Mar 2019, 02:09


Whitesail.jpg
Whitesail.jpg # (57.65 KiB) Viewed 5274 times (Thumbnail | Recognize | Sq Tile | LNFI)
Bellflower.jpg
Bellflower.jpg # (80.53 KiB) Viewed 5274 times (Thumbnail | Recognize | Sq Tile | LNFI)

Definitely a keeper, Tim...

Many thanks for this one... :thank_you: ....

FlutteringBy
FlutteringBy

enxio27
Forum Member
20th Place
228 Post(s)

Post#4 by enxio27 » 03 Mar 2019, 02:14


Oooh. . . all sorts of possibilities present themselves for digital scrapbooking. . .
GIMP Learn rocks...

tim
GL Blogger
1st Place
5539 Post(s)

Post#5 by tim » 03 Mar 2019, 02:28


Thanks for testing out my script.
I have to "disappoint" you with version 2.
Higher quality when you select many colors by creating full size (large) borders than scaled down.
And added a "Keep Aspect Ratio" toggle/option YES to Keep aspect ratio, NO to have constant border thickness all around.

PS: disappoint as in you gotta download another version... but it's superior to version 1.
aka Tin
World Food Program | Good Deeds Forum

         

Pat625
Tutorial Creator
2nd Place
4507 Post(s)

Post#6 by Pat625 » 03 Mar 2019, 04:01


No disappointment at all, Tin!! This is even better. Thank you.
TT.Sample_Border.Tiger.jpg
TT.Sample_Border.Tiger.jpg # (117.91 KiB) Viewed 5253 times (Thumbnail | Recognize | Sq Tile | LNFI)
TT.Sample_Border.Castle.jpg
TT.Sample_Border.Castle.jpg # (145.61 KiB) Viewed 5253 times (Thumbnail | Recognize | Sq Tile | LNFI)

Krikor
Forum Member
12th Place
915 Post(s)

Post#7 by Krikor » 03 Mar 2019, 04:14


Hi Tim, I've been testing this script a bit, but I was wrong to choose a very large image, and I ended up doing fewer experiments than I wish I could have done. :hammer_head:

Too bad the border only applies over the size of the image. It would be interesting if it could be applied to a selection, so we could create borders for oval images, etc.

Tim, thank you so much for this script. :thumbsup:
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

tim
GL Blogger
1st Place
5539 Post(s)

Post#8 by tim » 03 Mar 2019, 04:17


Oh I don't know how to apply colors to irregular shaped that still proportionally represent colors from the image.
aka Tin
World Food Program | Good Deeds Forum

         

Blighty
Forum Member
25th Place
83 Post(s)

Post#9 by Blighty » 03 Mar 2019, 09:51


I added some bevels to the frame.
Attachments
SampleColourBorderSunset.jpg
SampleColourBorderSunset.jpg # (98.86 KiB) Viewed 5211 times (Thumbnail | Recognize | Sq Tile | LNFI)
GIMP Learn rocks...

Pat625
Tutorial Creator
2nd Place
4507 Post(s)

Post#10 by Pat625 » 03 Mar 2019, 10:39


Very nice Blighty. I like those bevels.


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 16 guests