using an action to create a vector/scalable text ?

Here everybody can post his problems with PhotoLine
marco.molteni
Mitglied
Posts: 23
Joined: Sat 16 Feb 2008 23:25

using an action to create a vector/scalable text ?

Post by marco.molteni »

Hi all,
scenario: I would like to create a text watermark to put on top of my images. I want the text watermark to exploit the fact that text in PL is vectorial, that is it can scale without loosing detail. I want the watermark to be resized according to the image size, in such a way to be always readable. For example, say the image is 800x600, then probably a good size for the font is 12 pt. On the other hand, say the image is 3000x2000, then the font size would have to be bigger.

I know how to do all this by hand, but I think it would be way cool to make it in an action. I just started playing with actions, but it is not clear to me if I can do something like: set the text point size to x percent of the image width, or something equivalent, maybe: apply a scale factor to the text layer according to x percent of the image width.

Can I do this? Any hints?

thanks
marco
PS I've seen lutz's post about adding a watermark, but what I want to do is quite different and more flexible.
lutz
Mitglied
Posts: 376
Joined: Wed 12 Apr 2006 19:53

Re: using an action to create a vector/scalable text ?

Post by lutz »

Hello Marco,

indeed an interesting question. When I played around with the action, I could not figure out how to do automatic vector layers and their scaling (thus my workaround). Would be nice if there would be a way to achieve this.
marco.molteni
Mitglied
Posts: 23
Joined: Sat 16 Feb 2008 23:25

Re: using an action to create a vector/scalable text ?

Post by marco.molteni »

Hi Lutz, after having played a bit with actions, I think that the level of automatism I want is not possible. [As a tangent, looking around for how to write a plugin, I discovered that PS supports Javascript scripting. That would be WAY cool on PL :-)]. So I settled for something done by hand, which is not too bad after all:
watermark1.jpg
Here are the instructions:
1. resize the image to the typical size for you for the web. For example, 800x600. This is layer #7 in the screenshot.
2. create a text layer and write your watermark text, choose the text size to fit reasonably in your image size. Use white as the font color. This is layer #3 in the screenshot.
3. duplicate layer #3 as many times as you want to have your text appear in the image. BUT, duplicate it as a virtual copy. Why? Because if you want to change the text, then you just change the text in layer #3 and it will be changed automatically in all the virtual copies! In the screenshot, I have 3 virtual copies #4, #5, #6. Place each copy in the proper position over your image. I have mine placed in a grid.
4. put the text layer (#3) and the virtual copies in a group. This will allow you to do 2 things:
a. change the layer opacity of the layer group, instead of changing the layer opacity of each layer. (If you need to have different opacity per layer, you can do that too).
b. save the layer group as a PL document and load it in another image you want to apply the watermark.
5. add an empty text layer, give it the same size of your image and put it in the layer group. This is layer #2 in the screenshot. Why is this needed? Because this allows to keep the correct relative positions (that is, in layer properties, the offset) of the various text layers when you load the group into a different image, otherwise you would loose the offset.

That's it! Remember to decrease the opacity of the layer group to say 30 or 40%.
You do not have the required permissions to view the files attached to this post.
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 3893
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: using an action to create a vector/scalable text ?

Post by Gerhard Huber »

OK, here is a way to solve your problem.
- First create your Watermark. Convert it to vector and save it.
- Start recording your action
- Duplicate the active layer
- Select "File/Import/Image Into Active Layer" and load your Watermark.
- Stop recording
marco.molteni
Mitglied
Posts: 23
Joined: Sat 16 Feb 2008 23:25

Re: using an action to create a vector/scalable text ?

Post by marco.molteni »

hehe Gerhard, cool! Your suggestion is simple and elegant! thanks, I'll try that later.