Image>Add Borders menu option - useless??

Corel Paint Shop Pro

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

Image>Add Borders menu option - useless??

Post by JoeB »

A post by Levifiction in the Scripting sub-group caused me to check out the Image>Add Borders feature of PSP. From my limited testing with it I find it to be a very poor - i.e. useless - tool. For me, all it does is add a border to the whatever is the uppermost raster image, the border being around the full size of the image even if that top image only has a small opaque part in the middle, then it merges ALL layers (including vector layers) and flattens everything into a Background layer. I see no purpose for it whatsoever! Can anyone tell me if there is something I'm missing that might make it in any way useful before I remove it from that menu?
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Image>Add Borders menu option - useless??

Post by LeviFiction »

Nope. xD

It's handy for some things. Not everyone works on multiple layers and if they want to add a border, it's very quick and easy and simple. Especially if you're looking to add a border to make the image fit a specific size. The whole converting between inches, centimeters, pixels, and percents does come in handy. You can also look at it like it's meant to be used as a finishing touch to the image when you don't care that it's getting merged together. Anyway, there is a lot they can do to improve it, it just hasn't changed in forever.

I'm hoping to make a decent working replacement in script and offer it as a suggested improvement to Corel. Not the script, just what I do with it. Right now my hope is that I can make it 1) Add a border to either the whole image or just the current layer and 2) allow you to also place the border on its own layer as well. This will remove the the flattening problem. Allow you to keep the border on its own layer to fix or remove later if you wish. And the readouts will update with the size of the layer or image so you always know what you're working with.

Biggest issue, color selection. I can't use PSP's color selection with a TKinter application. So I have the script setup to let you choose between the current foreground and background colors only. Though I may include a hex box to paste RGB Hex code into. Might even include a transparency setting.
https://levifiction.wordpress.com/
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: Image>Add Borders menu option - useless??

Post by JoeB »

Thanks for the reply! I guess for some people's workflow it's fine. It's not that often I work on a flattened image and rare - if ever - for me to ever want to flatten an image in the workspace. Those circumstances where an image has to be flattened are those done automatically when I save in a format that's not PSP format, so I've never seen a need to have an image flattened in the workspace. Even images with no layers are saved in .pspimage format to ensure I'm keeping a lossless copy so no need to flatten them either. Just my workflow preference, I guess. And I agree that my preference also, if creating a frame/border/outline on the full size of an image, is to have that border on a separate layer for more versatility. For one thing, it allows me to do further stuff on the framed image, like perhaps adding a bit of saturation, contrast, etc., without it changing those attributes of the frame in any way.
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: Image>Add Borders menu option - useless??

Post by JoeB »

LeviFiction wrote:Right now my hope is that I can make it 1) Add a border to either the whole image or just the current layer...
With regard to the section of your post that I have quoted, when you say "...or just the current layer..." do you mean that, if the current layer, the border will only frame the opaque part of the current layer (like the script I posted does)?
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Image>Add Borders menu option - useless??

Post by LeviFiction »

Mine will use the layer Rectangle to create a border around. So...yes? The LayerRect returned by ReturnLayerProperties command has top, left, bottom, right pixel locations which are smaller than the total canvas size if the opaque areas are not located at the four farthest corners of the canvas. So if you have a layer with dots in the top left, top right, bottom left, and bottom right then the LayerRect will be close to if not equal to CanvasRect.
https://levifiction.wordpress.com/
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: Image>Add Borders menu option - useless??

Post by JoeB »

LeviFiction wrote:Mine will use the layer Rectangle to create a border around. So...yes? The LayerRect returned by ReturnLayerProperties command has top, left, bottom, right pixel locations which are smaller than the total canvas size if the opaque areas are not located at the four farthest corners of the canvas. So if you have a layer with dots in the top left, top right, bottom left, and bottom right then the LayerRect will be close to if not equal to CanvasRect.
One followup question. What if there are two or more opaque objects within the otherwise transparent layer? Will the Layer Rect return info about the location of all of those objects to allow further operations to be performed on them all simultaneously, and regardless of the orientation/rotation angle or different size and shape of any of the various objects? The reason I ask is that in a case where there are multiple opaque objects on one transparent layer then you can run my script once on that layer and the border (and drop shadow if also applied) will be applied to all of those objects - regardless of shape or orientation - with only one run of the script. I'm just thinking that where a lot of layers with smaller objects are added in a collage project it could be a time saver to simply merge all of those objects and run the script once, provided you are satisfied with having the same border size and color on all of the objects.
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Image>Add Borders menu option - useless??

Post by LeviFiction »

Time saver, yes. And very flexible with shapes. Where as mine is just a rectangle and a rectangle only. But where that rectangle is concerned mine will be more flexible.

I would like to be able to place an individual border around each opaque area of an image, but sadly me am dumb dumb. No, my border will just surround the entire layer with a single border. To get an individual border on every layer element in a layer you'd have to have each element on its own layer.

Thing is Select Selection Borders has a bad tendency to round off the edges if you get too big. I imagine successive small changes will limit this but still. So for the best rectangle I would need to avoid that command and I don't have a different option to positively identify multiple opaque objects. Also, since I'm replacing the current AddBorder command I only need a simple rectangle nothing else. This is also important because the border needs to be able to have different side widths to be a viable replacement. Something you can't do selecting the edge of a selection. What you're describing is closer to a Trace Edge or Stroke effect.

So we're actually creating two very different effects.
https://levifiction.wordpress.com/
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: Image>Add Borders menu option - useless??

Post by JoeB »

First, I agree that we're both working on 2 different effects. :-) That said, I do have a comment.
LeviFiction wrote:Thing is Select Selection Borders has a bad tendency to round off the edges if you get too big.
In my experience, that only applies when you select an Outside border, and in my experience even if the border being selected is relatively small it still rounds off the corners - and with jaggy rounding besides. That's why my script is written to select an inside border, which doesn't round off the corners regardless of the size of the selection or border. The same issue exists with Selection>Modify>Expand or Contract. That is, expanding a selection rounds off the corners but contracting it doesn't do so. This has been an issue with PSP since Day One as far as I know and never been fixed.

So any script that wants to create an outside border on a smaller image within the layer - with sharp corners - has to be written in a way that can create the first selection the number of pixels larger than the object image that you want the border to be, and then call the Select Selection Borders>Inside tool. I think I can figure out a way to do that but haven't time at the moment to work on it. If I can do it, then the script could be written to do an actual large, frame-sized border outside the image which could then be filled with patterns, etc., with proper shadows of the frame within the frame, and be used to create different frames.

Given that the purpose of my present script is to provide a border as an outline on smaller images within, and on top of, a larger image to simply outline it and separate it from the background, the border is expected to be relatively small compared to the image it surrounds. Therefore even being inside the image the border should never be large enough to cover anything important in the image. In other words, it's not meant to be a "frame" in the sense of framing a picture but simply an outline.

I find the concept - and discussion - interesting. However, if it were to continue then perhaps it would be better if the thread was in the Scripting sub-forum. Just a thought! :-)
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Image>Add Borders menu option - useless??

Post by LeviFiction »

I think this should only go to the scripting side if we talk about script specific information. In the case of all that has been discusses so far this has just as much interest just in the processes used.

Aa for a method for creating a selection slightly larger, off the top of my head duplicate the layer, expand the layer, select the layer, delete new layer, use selection.
https://levifiction.wordpress.com/
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: Image>Add Borders menu option - useless??

Post by JoeB »

LeviFiction wrote:I think this should only go to the scripting side if we talk about script specific information. In the case of all that has been discusses so far this has just as much interest just in the processes used.

Aa for a method for creating a selection slightly larger, off the top of my head duplicate the layer, expand the layer, select the layer, delete new layer, use selection.
Love that suggestion! The stuff I was thinking of would likely have been a bit messier. Thanks for it and I'll give it a try in a week or so. Christmas over but New Years stuff racing to take its place, and I'll be going out of town for almost a week as a result. Fun, but busy! :-) So best of the New Year to you and yours in the meantime! :-)
Regards,

JoeB
Using PSP 2019 64bit
Post Reply