It is currently 18 Sep 2019, 03:48


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
Social:  Say Hello | Anything Goes | Shares | FCSP

GIMP Python Fu Scripts/Plug-insCircle 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 15 times
circle_map.py #
version 2: Added option to map to square as well.
(3 KiB) Downloaded 30 times
Plug-in Menu Location: Python-Fu/Circle map
jesus_rectangle_or_square.jpg
active layer before running script
jesus_rectangle_or_square.jpg # (81.23 KiB) Viewed 469 times (Watermarked | Thumbnail)
jesus_circle.jpg
new "circle map" layer after running script
jesus_circle.jpg # (79.23 KiB) Viewed 469 times (Watermarked | Thumbnail)
version 2 maps in both directions:
pepsi_circle_map_to_circle.png
pepsi_circle_map_to_circle.png # (21.36 KiB) Viewed 414 times (Watermarked | Thumbnail)
pepsi_circle_map_to_square.png
pepsi_circle_map_to_square.png # (23.36 KiB) Viewed 415 times (Watermarked | Thumbnail)
2 x
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.
         

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 462 times (Watermarked | Thumbnail)
1 x
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.
         

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.
0 x
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.
         

tim

GL Blogger

Post#4 by tim » 22 Aug 2019, 13:00


amida_buddha_chant.png
amida_buddha_chant.png # (32.36 KiB) Viewed 427 times (Watermarked | Thumbnail)
0 x
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.
         

tim

GL Blogger

Post#5 by tim » 22 Aug 2019, 14:18


tim_hortons_01.png
tim_hortons_01.png # (24.68 KiB) Viewed 406 times (Watermarked | Thumbnail)
tim_hortons_03.png
tim_hortons_03.png # (25.67 KiB) Viewed 406 times (Watermarked | Thumbnail)
Attachments
tim_hortons_02.png
tim_hortons_02.png # (24.71 KiB) Viewed 406 times (Watermarked | Thumbnail)
0 x
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.
         

tim

GL Blogger

Post#6 by tim » 22 Aug 2019, 14:25


starbucks_01.png
starbucks_01.png # (75.15 KiB) Viewed 405 times (Watermarked | Thumbnail)
starbucks_02.png
starbucks_02.png # (72.06 KiB) Viewed 405 times (Watermarked | Thumbnail)
starbucks_03.png
starbucks_03.png # (82.63 KiB) Viewed 405 times (Watermarked | Thumbnail)
0 x
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.
         

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 x

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.
0 x
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.
         

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 295 times (Watermarked | Thumbnail)
121ayia_paraskevi.png
121ayia_paraskevi.png # (1018.72 KiB) Viewed 295 times (Watermarked | Thumbnail)
ellipse_map.py #
(2.34 KiB) Downloaded 11 times
1 x

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 x


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
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: No registered users and 3 guests