This week's banner is by lwc from Oklahoma, USA

Problems and solutions
Back to the book | Post New Topic | Search | Help | Log In | Register

» Forum Index » Problems and solutions » Topic: Add a stroke

Posted on 24/06/06 07:37:59 AM
Tom
Texture Technologist
Posts: 402

Reply


Add a stroke
I am designing an ad layout featuring photos of oil paintings.
I would like to add a stroke that is an equal distance from all edges of the painting.

Have tried loading a selection then select>transform selection.
But if you preserve aspect ratio, the margins eventually will not be uniform as you expand the selection.

I would rather not do this by eye as I want to do it on more than one image, exactly the same.

Is there a way to do it automatically without using a calculator?
Thanks.





Posted on 24/06/06 10:40:25 AM
David Asch
Tech Support
Posts: 1913

Reply


Re: Add a stroke
I'm not sure if I'm understanding this correctly but one solution might be:

Make the background into a regular layer.
Create a new layer beneath (filled if necessary)
Increase the canvas size relatively as constant or a percentage.
Select All
Stroke>Inside

You can create an action to run as a batch process, too.



_________________
If you hold on to the past, sooner or later you'll lose your grip.

Posted on 24/06/06 4:48:36 PM
Tom
Texture Technologist
Posts: 402

Reply


Re: Add a stroke
The Photo of the oil painting, represented by the gradient, is on it's own layer.
There will be two on a page, each with unique dimensions.

If, for example, you load a selection on the painting and choose transform selection, then shift+opt/alt drag, the selection will expand in the same proportion as the rectangle of the painting.

The more it expands, the more the height and widith of the margins become uneven.

Posted on 25/06/06 12:53:35 PM
David Asch
Tech Support
Posts: 1913

Reply


Re: Add a stroke
I see what you mean. Certainly a tricky one.

_________________
A happy-go-lucky chap, always dressed in black

Posted on 25/06/06 5:59:46 PM
Tom
Texture Technologist
Posts: 402

Reply


Re: Add a stroke
I think I will just not use it for now.

Posted on 26/06/06 1:58:36 PM
Steve Caplin
Administrator
Posts: 7047

Reply


Re: Add a stroke
Here's a possibility: on a new, large document, draw a horizontal line the distance you want it from the top of the page. Select All, duplicate and rotate 90° counter clockwise, and drag the line (with its selection) to the edge of the page. That will give you a vertical and a horizontal border on the top and left of your document. Duplicate this layer, and rotate 180°.

Now, in a new document, you should be able to drag the first layer in and, with Snap to Document Bounds selected, easily fit it to the top left corner. Then fit the other, rotated layer to the bottom right corner.

Does this make sense? Is it what you want?

Posted on 29/06/06 06:54:04 AM
Tom
Texture Technologist
Posts: 402

Reply


Re: Add a stroke
I think I contemplated something like that, Steve.

To be clearer; The paintings will be separate objects in the document, two to a page.

I was able to make a stroke on this example by loading a selection, transformed it with shift+option, then edit>stroke.
But it is square, so it worked. All the other paintings are various rectangles.

I suppose I could carefully measure each painting, add up what the stroke dimensions should be then use the rectangular marquee at a fixed size.
Too much work. Ha ha.






Posted on 29/06/06 09:04:43 AM
Steve Caplin
Administrator
Posts: 7047

Reply


Re: Add a stroke
OK, I understand now. I think this could be done fairly easily with an Action. These are the steps:

1. Turn background into a regular layer by double-clicking it.

2. Expand canvas by, say, 140% all round. (This will result in a transparent background, because of step 1.)

3. Cmd/Ctrl click on layer's icon in Layers Palette to select contents.

4. Expand selection by how ever many pixels you want the border to be.

5. Crop to selection.

6. Select All.

7. Add stroke. (Don't do this before step 5, or you'll get cut-off edges.)

Here is an Action that I wrote to do this. Change the numbers (expand amount x 2, stroke) to suit your needs!


Posted on 29/06/06 11:53:05 PM
Pierre
Constructional Confabulator
Posts: 637

Reply


Re: Add a stroke
Another one in my bag of tricks! I had the exact same question!
Very clever stuff Steve. I guess that's why YOU wrote the book...

_________________



Posted on 30/06/06 00:29:39 AM
rufus
Destructive Demon
Posts: 243

Reply


Add a stroke


Posted on 30/06/06 00:30:13 AM
rufus
Destructive Demon
Posts: 243

Reply


Add a stroke


Posted on 30/06/06 00:30:47 AM
rufus
Destructive Demon
Posts: 243

Reply


Add a stroke
At 07:37:59 AM 24/06/06, Tom wrote:
I am designing an ad layout featuring photos of oil paintings.
I would like to add a stroke that is an equal distance from all edges of the painting.........


Tom, this should do the trick

Open your image and convert the background layer to a normal layer
Add a new layer and position this below the image layer
Select Image/Canvas Size and increase the size by double the amount of the border required and tick 'Relative'
Fill the new layer with any colour or pattern you like

You can write an action to duplicate this if necessary

rufus


Posted on 30/06/06 01:08:28 AM
Tom
Texture Technologist
Posts: 402

Reply


Re: Add a stroke
Thanks Steve and Rufus for the answers.
I was a bit confused at first because I was trying to do this after the layer/painting was added to the document.
The stroke must be applied first then the stroke and image dragged over.

I have distilled your descriptions to my needs;

Open image layer.
Canvas size>expand/relative .5 x .5 inches.
Add blank layer.
Select all>edit>stroke>deselect.
This puts the stroke on a separate layer so now I can add a drop shadow or whatever to the image.

Drag the stroke and image layers on to the document.

That's it!
Give yourselves a hand.



Back

[ To post a reply, please Log In or Register ]

Powered by SimpleForum Pro 4.6