It is currently 06 Jul 2020, 12:56

• 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

Get Average Color Plug-in

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

Get Average Color Plug-in

Post#1 by tim » 10 Jun 2019, 05:36


Simply sets foreground color to average color of selection (if one exists) otherwise of whole active layer.
get_average_color.py
(2.63 KiB) Downloaded 137 times
Plug-in Menu Location: Python-fu/Get Average Color

Instructions:
  1. Make a selection or not.
  2. Run plug-in.
  3. That's it, average color of selection or whole active layer will be set as foreground.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

Wallace
Global Moderator

Post#2 by Wallace » 10 Jun 2019, 06:51


tim wrote:
10 Jun 2019, 05:36
Simply sets foreground color to average color of selection (if one exists) otherwise of whole active layer. get_average_color.py

Plug-in Menu Location: Python-fu/Get Average Color

Instructions:
  1. Make a selection or not.
  2. Run plug-in.
  3. That's it, average color of selection or whole active layer will be set as foreground.
That was quick.
I'm not sure what this night be used for, but it's nice to have.
Maybe it can be good for creating a color overlay that matched the image.
Image
0

nidhogg
Forum Member

Post#3 by nidhogg » 10 Jun 2019, 09:58


Will test later.
There is the ofn-average-fill.py, that fills the selection with average color.
I thought it would be good way to create stained glass windows, using first the tesselate plug-in that was posted while ago to create voronoi or delauney pattern on top. But you have to switch between the selection layer and the image layer for each area fill.
Fill-With-Average.png
Fill-With-Average.png (937.18 KiB) Viewed 2611 times
Last edited by nidhogg on 10 Jun 2019, 10:01, edited 1 time in total.
GIMP Learn rocks...
0

rich2005
GIMP Guru

Post#4 by rich2005 » 10 Jun 2019, 10:01


Reinventing the wheel ;)

There are pre-cursors, RobA script from 2009 My preference since I can load it as required using resources manager.
Ofnuts (2017) fill layer / selection straight off and the latest, very nice straight into FG.

Image
0

tim
GL Blogger

Post#5 by tim » 10 Jun 2019, 12:55


oh hehehe I reinvented the wheel!
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

tim
GL Blogger

Post#6 by tim » 10 Jun 2019, 12:57


nidhogg wrote:
10 Jun 2019, 09:58
Will test later.
There is the ofn-average-fill.py, that fills the selection with average color.
I thought it would be good way to create stained glass windows, using first the tesselate plug-in that was posted while ago to create voronoi or delauney pattern on top. But you have to switch between the selection layer and the image layer for each area fill.

Fill-With-Average.png
If you select all the triangles then you can do it all in one go on a transparent layer with Fill Average Color script I made.
viewtopic.php?f=3&t=865
You just have to name your Source layer "Source" as it needs to grab colors (average colors) from that layer.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

nidhogg
Forum Member

Post#7 by nidhogg » 10 Jun 2019, 14:02


How have I missed that plug-in!!
I created first tesselate pattern, using voronoi. Fuzzy selection, threshold raised to 150, that way it selects the large areas without the dots. Ran the plug-in on empty layer. Pixels to grow = 0, Edit-Blend = no.
Again fuzzy selection on the voronoi layer, shrink by 1 pixel hit delete. Dots gone, me happyyyy!
Thank you, I will enjoy playing with this.
Tesselate-Average-Fill.png
Tesselate-Average-Fill.png (742.22 KiB) Viewed 2584 times
GIMP Learn rocks...
1

Archie
Forum Member

Post#8 by Archie » 11 Jun 2019, 09:33


@nidhogg, Very nice. I had to play around some to get rid of those dots. My brush was too big. 2 px worked. Thank you.

Thanks Tim.
Attachments
IMG_3074__.png
IMG_3074__.png (1008.35 KiB) Viewed 2552 times
GIMP Learn rocks...
2

nidhogg
Forum Member

Post#9 by nidhogg » 11 Jun 2019, 15:45


Yes, brush 2. hardness 100, 2px works well. Beware that you don't have some 2500x2500 grunge brush loaded when you hit ok. :lol:
GIMP Learn rocks...
0


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
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests