Possible applying an outline stroke (line vector) around a raster image?

Here everybody can post his problems with PhotoLine
cadudesun
Mitglied
Posts: 19
Joined: Tue 14 Dec 2021 15:36

Possible applying an outline stroke (line vector) around a raster image?

Post by cadudesun »

Hi. I'd appreciate your help.

a) In Photoline v23, is it possible to apply an outline stroke (line vector) around a raster image?
Here there is an example (from another application) of what I'm looking for: https://tinyurl.com/yxbot6pr
PS: I just started posting in Photoline forum, so please let me know whether I shouldn't be using explicit reference to other applications.

b) I could apply outline "inside" and "outside" by using layer styles.
As shown in this video (https://tinyurl.com/y4cxptqq), by default "outline inside" is presented with squared corners, and "outline outside" with rounded corners.
Is it possible to tweak the corner types within each style?
I mean, how to make an "outline inside" corner rounded?
How to make an "outline outside" corner squared?

Thank you!
Cadu
User avatar
shijan
Mitglied
Posts: 1058
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by shijan »

Nope, you can't apply vector stroke effect to raster images. Not sure why, but even Placeholders (vector based containers) can't use vector outlines.

Same time Layer Styles for raster images in PhotoLine are raster based and 8 bit only (same as 3D Lighting effects and Brushes soft borders). Layer Styles size is limited to avoid 8 bit banding effect or due some other unknown legacy reason. This was discussed a lot in beta forum ( viewtopic.php?p=49569#p49569 )
So let's hope that Layer Styles engine could be improved in future versions to support 16 bit depth and unlimited size.

You can reproduce desired effect do with a small simple trick:
1. Create vector rectangle the same size as your image. (If auto snapping is disabled in preferences, use Alt key to snap it exactly to to image borders)
2. Set transparent color to vector rectangle fill to make it invisible.
3. Set any desired outline to vector rectangle.
4. Put both vector and raster layer inside group to move and transform it as a single layer.
Image
Last edited by shijan on Sat 18 Dec 2021 03:30, edited 1 time in total.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
User avatar
shijan
Mitglied
Posts: 1058
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by shijan »

You can do "outline inside" with internal rounded corners in same way. Just use Rounded Rectangle vector object as source for rounded corners. In addition you may need to add Vector Rectangle Mask to hide outside rounded corners and keep only inside rounded corners.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
User avatar
shijan
Mitglied
Posts: 1058
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by shijan »

And in same way you can create large sized shadow effects for rectangle images:
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Martin Huber
Entwickler
Entwickler
Posts: 3929
Joined: Tue 19 Nov 2002 15:49

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by Martin Huber »

cadudesun wrote: Sat 18 Dec 2021 01:44 a) In Photoline v23, is it possible to apply an outline stroke (line vector) around a raster image?
IMHO the simpliest (and most effective) solution is using "Layout > Vector > Fit in Vector Layer" and assigning the line style to that vector layer.

Martin
cadudesun
Mitglied
Posts: 19
Joined: Tue 14 Dec 2021 15:36

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by cadudesun »

Many thanks to all of you for teaching those techniques.

a) Regarding "Layout > Vector > Fit in Vector Layer", although I could create a rectangle with "fill" color, I couldn't create it with "line" color (and without "fill").
As shown in the screen-recording (https://tinyurl.com/y2afeo6j), every time I run "Fit in Vector Layer", the "line" color and width is reset.
Is it possible to obtain as output of "Fit in Vector Layer" a rectangle with "line" color & width, and without "fill"?

b) From a selected raster image, could you please inform whether an action could automate the creation of a (1) solid border (2) with shadow (3) around that raster image?
Since I perform this task often, I do need to select a raster image, trigger a command and the job is done.
Just for reference, what I'm looking for would be something similar to this: https://tinyurl.com/yywmhcgm

Cheers!
User avatar
shijan
Mitglied
Posts: 1058
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by shijan »

Yes, "Fit in Vector Layer" only use Foreground color form Toolbox. Guess in some situations this may be more useful than use vector style, but in other situations may not.
If you need complex chain of multiple tools and settings - just record an Action. So it all will be done in single click:
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
cadudesun
Mitglied
Posts: 19
Joined: Tue 14 Dec 2021 15:36

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by cadudesun »

Hi shijan. Many thanks for your prompt reply and visual explanation!
I could accomplish the task by creating an action, but having much more steps than yours (screenshot below).
CopyQ.DoiKtO.png

For instance, I changed fill color to transparent by clicking on the dropdown button and picking alpha in the "color editor", and it recorded 4 steps within the action. The same happened to "stroke color" and "line style".

I'd appreciate your further help regarding:

a) By chance have you cleaned up your action after recording, or is there any trick to record just one step when changing color, etc?

b) Once an action is already recorded, is there any way to append a further step, or is it necessary to start from the scratch a new action?
You do not have the required permissions to view the files attached to this post.
User avatar
shijan
Mitglied
Posts: 1058
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Possible applying an outline stroke (line vector) around a raster image?

Post by shijan »

I just provided quick example. If your action automates more things it will look different. Have no idea why changing color was recorder 4 times. Maybe mouse button glitch? Overall it doesn't matter at all how many steps inside action if it works for you.
You can edit any step of the action later. For example double click on the step ""Change Stroke Color" in the action list and set different color for this step. And so on...

Note that editing of Action is dependent of selected layer. Or for example if action was recorded in Document mode, it may not work as expected in Picture Mode. So in some situations it is simpler to create new action instead of editing existing one.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302