Adjustable Rounded Image Corners...and More

Moderator: Kathy_9

Post Reply
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Adjustable Rounded Image Corners...and More

Post by JoeB »

EDIT: As of Aug. 2/17 I have uploaded a replacement zipped file of the script for those 17 people who already downloaded the original. It's the same script but I found one step asked in a popup if you wanted to delete a layer. That should have been done automatically and silently without needing input. Now it all works silently.
------------------------------------------------

In a post in the PSP forum, user @badger50 asked for a script to be able to adjust the curve of a selection to create manually adjustable rounded corners. That post is here: http://forum.corel.com/EN/viewtopic.php?f=56&t=61952

I have now created a script, with grateful assistance with coding issues I ran into from @LeviFiction, that creates a rounded corner selection on an image that allows the user to (a) manually adjust the size of the selection, (b) manually allows the user to adjust the curvature of the rounded corners, (c) manually allows the user to move the selection wherever he/she wants on the image, and (d), then automatically creates a new image using the selection created by the user.

The idea is to give the user complete customization of the selection - curvature size, selection rectangle size, and rectangle position on the original image to get the desired crop.

The script uses Gary Barton's Pause Script and is run in two stages (for those who need it the instructions are in the script's header). However, it's quite simple to run and only takes 2 clicks.

With your image open, you run the script. You'll get a semi-transparent white lith overlay on the image with moveable nodes around it and one in the center. Clicking and dragging the nodes on the top, bottom or sides will let you resize the rectangle to taste. Placing the cursor on the node in the center until it becomes a Mover icon then clicking and dragging allows user to position the rectangle as desired. Clicking and dragging the nodes at the left and top edges of the top left curve allows user to adjust the size of the rounded curvature (the other corners automatically adjust accordingly).

Then just run the script again and you'll get a copy of the image portion you selected, with the curve size you choose, pasted as a new image in your workspace.

AND, if you wish to make another different crop from the same original, you can just put focus on that original and run the script again, make new adjustments in size, curvature and position as desired, and run again to copy that new selection as a new image.

For my own use, I made it a bound script and put it on the flyout of the Selection tool. I'd prefer to have it on the selection Tool Options but apparently you can't customize that ribbon by adding stuff. :-(

Not sure it's something most will use often, but hope it finds some use for some! :-)
Attachments
Rounded Rectangle_Adjust Corners.zip
Rounded Rectangle_Adjust Corners_removed a small popup
(3.71 KiB) Downloaded 262 times
Last edited by JoeB on Wed Aug 02, 2017 11:55 pm, edited 7 times in total.
Regards,

JoeB
Using PSP 2019 64bit
Kathy_9
Site Admin
Posts: 2896
Joined: Tue Nov 30, 2010 12:44 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: 8th Generation Intel Core i7 8700 3 20 GHz
ram: 16GB
Video Card: NVIDIA GeForce RTX 2060 [6 GB GDDR6 dedicated]
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP EliteDisplay E243m 23.8-inch
Corel programs: PSPX2 ~2023; Painter 2018~23
Location: USA
Contact:

Re: Adjustable Rounded Image Corners...and More

Post by Kathy_9 »

Thanks Joe. Hope the person who was originally looking for this comes back and sees this.
PSPX9 | PSP2020 | PSP2021| PSP2022 | PSP2023 & PhotoMirage installed; PSPX | PSPX2 thru PSP2019 owned but not installed
http://www.flickr.com/photos/37153430@N03/
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Adjustable Rounded Image Corners...and More

Post by JoeB »

Kathy_9 wrote:Thanks Joe. Hope the person who was originally looking for this comes back and sees this.
Hope so if he can use it. Didn't really have a choice about doing it given that I had suggested in a reply to the original post that it could be scripted "with a little effort". :-) Took a bit more effort than I thought as I'm not that familiar with some python syntax issues as well as some codes. But LeviFiction was kind enough to help me with those issues, so I learned from the exercise.

Just for fun I thought of adding an option to add a filled border around the resultant image if the user so desired but figured that would be overkill. :-)
Regards,

JoeB
Using PSP 2019 64bit
Zantara
Posts: 318
Joined: Mon Feb 16, 2015 8:55 am
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
processor: i5-2100 3 10 Ghz
ram: 12Gb DDR4
Video Card: Intel UHD graphics 620
Hard_Drive_Capacity: 256SSD 1TB
Corel programs: From PSPX2 to PSP2022
Location: The Netherlands
Contact:

Re: Adjustable Rounded Image Corners...and More

Post by Zantara »

@Joe
Thank you for the script.
I like it so much that I would like to use it in a tutorial.
May I have your permission to direct visitors who want to make the tutorial to this post, crediting you ( and LeviFicition) as the creator?
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Adjustable Rounded Image Corners...and More

Post by JoeB »

Zantara wrote:@Joe
Thank you for the script.
I like it so much that I would like to use it in a tutorial.
May I have your permission to direct visitors who want to make the tutorial to this post, crediting you ( and LeviFicition) as the creator?
Thanks - I'm glad you like it! Yes, of course you can use it in a tutorial. You are likely aware that the script can be easily edited to change the color and transparency of the transluscent white lith overlay. I just used white because it doesn't seem too intrusive and I wanted a different color from the ruby lith used by the Edit Selection feature when you are editing a regular selection.

I'd be interested in seeing the tutorial once you have it done, assuming it's an online tutorial.
Regards,

JoeB
Using PSP 2019 64bit
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Adjustable Rounded Image Corners...and More

Post by JoeB »

I have re-posted the zipped script! I just noticed that one step did not run silently (i.e., you would get a popup asking if you wanted to delete a layer and you were supposed to say yes). This should not have appeared and the layer being referred to should just be deleted automatically. So the newly uploaded version now runs silently as it was supposed to. Otherwise it's the same script.

Sorry about that.
Regards,

JoeB
Using PSP 2019 64bit
Zantara
Posts: 318
Joined: Mon Feb 16, 2015 8:55 am
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
processor: i5-2100 3 10 Ghz
ram: 12Gb DDR4
Video Card: Intel UHD graphics 620
Hard_Drive_Capacity: 256SSD 1TB
Corel programs: From PSPX2 to PSP2022
Location: The Netherlands
Contact:

Re: Adjustable Rounded Image Corners...and More

Post by Zantara »

Thank you, Joe.
I downloaded the revised script and will write my first creative tutorial, using your script.
Yes, it will be an online tutorial.
At the moment I'm at the busiest time of the year: when a new version of PSP has been released.
That's what I write about mainly. When the dust settles, I write creative tutorials. Using tubes, masks etc. in the past, but now focussing on what PSP is made for: photo-editing.
That's where your script comes in :D
Post Reply