It is currently 15 May 2021, 08:27

• 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

Circle Paint Plug-in

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

Circle Paint Plug-in

Post#1 by tim » 07 May 2019, 15:39


This plug-in will let you specify number of circles to paint. It then randomly fuzzy selects grabbing average color and area.
Then sorts by size from largest to smallest and paints them.
circle_paint.py #
(5.15 KiB) Downloaded 134 times
Plug-in Menu Location: Python-Fu/Circle Paint...

Instructions:
  1. Open image you want to circle paint with.
  2. Run plug-in, choose number of circles to paint, click OK to run.
  3. That's it. (the more circles you paint the slower it is a good number to try out is 1000 then you'll have a feel of how many circles you want to paint and balance between speed and quality).

    Sample results:
    mona-lisa-circles-small.jpg
    mona-lisa-circles-small.jpg # (66.04 KiB) Viewed 3407 times (Thumbnail | Recognize | Sq Tile)
    guitarist-circles.jpg
    guitarist-circles.jpg # (68.49 KiB) Viewed 3407 times (Thumbnail | Recognize | Sq Tile)
aka Tin

         

Wallace
Global Moderator

Post#2 by Wallace » 07 May 2019, 19:42


Got this error, while running the plugin in GIMP 2.8.18.
Image
Image

tim
GL Blogger

Post#3 by tim » 07 May 2019, 20:22


Wallace wrote:
07 May 2019, 19:42
Got this error, while running the plugin in GIMP 2.8.18.
Image
Just change constant to LAYER_MODE_NORMAL to whatever NORMAL_MODE for gimp 2.8
aka Tin

         

Wallace
Global Moderator

Post#4 by Wallace » 07 May 2019, 20:30


tim wrote:
07 May 2019, 20:22
Wallace wrote:
07 May 2019, 19:42
Got this error, while running the plugin in GIMP 2.8.18.
Image
Just change constant to LAYER_MODE_NORMAL to whatever NORMAL_MODE for gimp 2.8
I don't understand?
Layer mode is normal in 2.8, so I don't know what to change it to, or where to make the changes? :hammer_head:
Image

tim
GL Blogger

Post#5 by tim » 07 May 2019, 20:31


in the plug-in you have you search for that exact text "LAYER_MODE_NORMAL" and change it to "NORMAL_MODE" (IIRC I don't have 2.8 anymore so I can't test it).

Plug-in tries to create a new layer calling GIMP 2.10 constant "LAYER_MODE_NORMAL" for 2.8 you'll have to call it with NORMAL_MODE.

Test with like 2 circles first to see if the code runs fine then you can do a good copy of more circles since you don't want to wait forever in order to find out that script is still broken.
aka Tin

         

Wallace
Global Moderator

Post#6 by Wallace » 07 May 2019, 20:35


tim wrote:
07 May 2019, 20:31
in the plug-in you have you search for that exact text "LAYER_MODE_NORMAL" and change it to "NORMAL_MODE" (IIRC I don't have 2.8 anymore so I can't test it).

Plug-in tries to create a new layer calling GIMP 2.10 constant "LAYER_MODE_NORMAL" for 2.8 you'll have to call it with NORMAL_MODE.
Thank's Tim, but I'm not going to do this,
because don't know what to change it to.

Edit:
I changed LAYER_MODE_NORMAL to NORMAL_MODE in the file.
This is what I got.
Is there suppose to be missing pixels in the finished image?

Image
Image

tim
GL Blogger

Post#7 by tim » 07 May 2019, 21:00


The finished product could possibly have transparent areas as the whole process is based on random fuzzy selects.
So the more circles you choose the more it'll likely to cover the image but some transparent is normal. Just fill it with whatever you like or use the original to fill it however you like.
aka Tin

         

Wallace
Global Moderator

Post#8 by Wallace » 07 May 2019, 21:15


tim wrote:
07 May 2019, 21:00
The finished product could possibly have transparent areas as the whole process is based on random fuzzy selects.
So the more circles you choose the more it'll likely to cover the image but some transparent is normal. Just fill it with whatever you like or use the original to fill it however you like.
I set it to 100000 circles, wouldn't that be enough to fill the image?
Image

tim
GL Blogger

Post#9 by tim » 07 May 2019, 23:44


It should but it's not guaranteed because of randomness.
aka Tin

         

Wallace
Global Moderator

Post#10 by Wallace » 08 May 2019, 01:26


Here's my Ryzen wallpaper image.
Done using 1000000 circles.
100000_circles.png
100000_circles.png # (40.52 KiB) Viewed 3353 times (Thumbnail | Recognize | Sq Tile)
Layer.png
Layer.png # (273.45 KiB) Viewed 3353 times (Thumbnail | Recognize | Sq Tile)
ryzen_wallpaper.png.png
ryzen_wallpaper.png.png # (378.87 KiB) Viewed 3353 times (Thumbnail | Recognize | Sq Tile)
Image


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