Script: Selection - Expand with Square Corners

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

Script: Selection - Expand with Square Corners

Post by JoeB »

This is a simple script prompted by the bug/annoyance in all PSP versions whereby using Selections>Modify>Expand to expand a rectangular selection creates the expanded selection with rounded corners instead of square ones. The workaround, as pointed out by Suz Shook years ago (and it's on her Tips & Tricks page), is to then take the second step of using the option on the selections Tool Options bar to Create Selection From and selecting Current Selection. It's a bunch of steps I also find annoying.

With this simple script, once you have created your original rectangular selection, running the script brings up the Expand Selection dialogue where you can enter the number of pixels by which you want to expand the selection. When you click OK on that dialogue the script automatically continues and implements Create Selection From Current Selection and you'll have your expanded selection with square corners.

I have bound the script to an icon and moved it to the Selections menu so that once I create a selection I only have to go there, click the script icon, and I automatically get the dialogue to set number of pixels to expand, click OK and I get my expanded rectangle with square corners. It saves going to the Modify sub-menu as well as saving having to click the Create Selection From icon to complete the task. But you could bind it and put it wherever it's most convenient. I wanted to put it on the Selections Tool Options bar but that can't be done.
Attachments
Selection_Expand with Square Corners.zip
Expands a selection with square borders.
(698 Bytes) Downloaded 335 times
Last edited by JoeB on Sun Sep 30, 2018 5:42 pm, edited 5 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: Script: Selection - Expand with Square Corners

Post by Kathy_9 »

Thanks Joe.
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: Script: Selection - Expand with Square Corners

Post by JoeB »

Kathy_9 wrote:Thanks Joe.
You're welcome, Kathy. Just a small tool script but hope you find it useful. The rounded corners on expand bug has always bugged me, and I was annoyed by all the clicks necessary to expand and then square the corners and just wanted to streamline the process. :-)
Regards,

JoeB
Using PSP 2019 64bit
Post Reply