It is currently Thu Aug 06, 2026 5:22 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Shrink Grow Feather Selection with LIVE PREVIEW
PostPosted: Tue Jan 02, 2024 4:39 am  (#41) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2014
Posts: 875
@MareroQ
@PixLab

Thank you for your kind words.
Unfortunately I was unable to find the correct syntax for the update-policy to make the same change for the spinners and I don't know if it is possible to make these changes global.

Ideally what I would like is that only incremental changes are fed to shrink, grow, etcetera, rather than calculated from the original selection. Then the OK button would simply remove the preview layer and the saved channel would only be used for cancel (undo).

However, my knowledge of Python is extremely limited and my knowledge of GTK non-existent!

david.


Top
 Post subject: Re: Shrink Grow Feather Selection with LIVE PREVIEW
PostPosted: Tue Jan 02, 2024 6:15 am  (#42) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
It's very cool how three guys with minimal gtk knowledge could create a plugin that can compete with GEGL - and sometimes maybe even better (you don't have to compile it, you can use any PDB routine, and Tin Tran's modular code is easy to use).

@PixLab

I am considering removing the "Activate Parameters" button, but then the result may be displayed before the plugin itself is displayed. I also think that most users prefer to enable the preview themselves.

_________________
Image


Top
 Post subject: Re: Shrink Grow Feather Selection with LIVE PREVIEW
PostPosted: Tue Jan 02, 2024 8:45 am  (#43) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4527
Location: Canada
woh, I just found code that was combined effort from gimp-forum.net
All I did was make translator with help of chatGPT.
I was just pretty much the cut and paste dude with some minor changes.

_________________
TinT


Top
 Post subject: Re: Shrink Grow Feather Selection with LIVE PREVIEW
PostPosted: Tue Jan 23, 2024 9:41 am  (#44) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2014
Posts: 875
@TinT
@MareroQ

I have made a few more changes to this plug-in:
Added calculated limits for Offset x & y,
Removed "apply_effect" from "apply_final" - it does not appear to be necessary,
Put limit calculation in an "if" statement so that the limits are only calculated once.

In order to try and speed-up the plug-in for large images and eliminate the need for the "Activate Parameters" button, I have attempted to save the previous radius and feather radius settings so that I can test for a large change in their settings (perhaps about 200 pixels), update the selection and re-calculate the limits, but have been unable to get my logic correct to achieve this.
The original selection would need to be saved to allow the "Undo" button.

Any ideas how to do this?

I have attached my latest working version for your comments.

david.

Attachment:
Grow_Shrink_Live_Preview_MrQ.zip [4.39 KiB]
Downloaded 61 times


Top
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group