It is currently 29 Jan 2020, 21:08


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 Map plug-in

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

Circle Map plug-in

Post#1 by tim » 22 Aug 2019, 00:04


Maps a rectangular/square layer to a circle. Formula used is from https://www.xarg.org/2017/07/how-to-map ... -a-circle/.
circle_map.py
(2.29 KiB) Downloaded 50 times
circle_map.py
version 2: Added option to map to square as well.
(3 KiB) Downloaded 71 times
Plug-in Menu Location: Python-Fu/Circle map
active layer before running script
active layer before running script
jesus_rectangle_or_square.jpg (81.23 KiB) Viewed 1646 times
new "circle map" layer after running script
new "circle map" layer after running script
jesus_circle.jpg (79.23 KiB) Viewed 1646 times
version 2 maps in both directions:
pepsi_circle_map_to_circle.png
pepsi_circle_map_to_circle.png (21.36 KiB) Viewed 1591 times
pepsi_circle_map_to_square.png
pepsi_circle_map_to_square.png (23.36 KiB) Viewed 1592 times
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.
         
2

tim
GL Blogger

Post#2 by tim » 22 Aug 2019, 02:14


victoria_building_circle_map.png
victoria_building_circle_map.png (351.2 KiB) Viewed 1639 times
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

tim
GL Blogger

Post#3 by tim » 22 Aug 2019, 12:12


Don't know if this feature is in GIMP yet or not.
But this logic/math was easily copied from the net for perfect mapping from square/rectangle (rectangle is scaled down to square) then mapped to the unit circle and scaled to fit square layer size.
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#4 by tim » 22 Aug 2019, 13:00


amida_buddha_chant.png
amida_buddha_chant.png (32.36 KiB) Viewed 1604 times
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#5 by tim » 22 Aug 2019, 14:18


tim_hortons_01.png
tim_hortons_01.png (24.68 KiB) Viewed 1583 times
tim_hortons_03.png
tim_hortons_03.png (25.67 KiB) Viewed 1583 times
Attachments
tim_hortons_02.png
tim_hortons_02.png (24.71 KiB) Viewed 1583 times
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 » 22 Aug 2019, 14:25


starbucks_01.png
starbucks_01.png (75.15 KiB) Viewed 1582 times
starbucks_02.png
starbucks_02.png (72.06 KiB) Viewed 1582 times
starbucks_03.png
starbucks_03.png (82.63 KiB) Viewed 1582 times
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

No avatar
rich2005
GIMP Guru

Post#7 by rich2005 » 23 Aug 2019, 11:16


tim wrote:
22 Aug 2019, 12:12
Don't know if this feature is in GIMP yet or not.
But this logic/math was easily copied from the net for perfect mapping from square/rectangle (rectangle is scaled down to square) then mapped to the unit circle and scaled to fit square layer size.
There is the same in gmic_gimp_qt Deformations -> Square to Circle (and circle-to-square as a mode)

Dare I say that it is just a tad faster than your plugin ;)
1

tim
GL Blogger

Post#8 by tim » 23 Aug 2019, 13:00


rich2005,
I blame the slowness on get pixel and set pixel in GIMP's procedures.
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

david
Forum Member

Post#9 by david » 25 Aug 2019, 15:39


tim,

Apologies - I've been playing!!!

I thought why does your Circle Map plug-in have to be restricted to a circle? I have made a couple of slight alterations so that it maps a rectangular image to an ellipse. Absolutely of no use to anyone and even slower than your original!!!

david.
Attachments
121ayia_paraskevi.jpg
121ayia_paraskevi.jpg (140.09 KiB) Viewed 1472 times
121ayia_paraskevi.png
121ayia_paraskevi.png (1018.72 KiB) Viewed 1472 times
ellipse_map.py
(2.34 KiB) Downloaded 48 times
1

Pat625
Tutorial Creator

Post#10 by Pat625 » 25 Aug 2019, 19:47


Tin and David, don't apologize. This is how it should work. Working together, (even if you are not aware) is the way ideas evolve. Building, adding, altering, making it better or different. I love to see that in our forum!
1


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
• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

Who is online

Users browsing this forum: Jappaloe63 and 8 guests