What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How can I do a border *without* using the border function?


nzmike

New Member
Messages
4
Likes
0
Hi,

I need to know how to put a border around a photo to make it looked framed. For example, around the photo would be about 20 pixels of white with a 1 pixel black outline right around the outside (so it looks "framed"). The only problem is that I can't use the Border function in PS CS to do this as I need to record it (using the scripting listener) for a VB.Net program I'm writing to do auotmatic processing of photos - and unfortunately when I run a script with the Border command/function it won't run.

Sorry if that's confusing - I just need to concentrate on creating a border without using the border function... can anyone point me in the right direction?

Thanks in advance...

Mike.
 
The easiest way, since you can just use black and white, is probably to change your background color to white, increase the canvas size by 40 pixels in width and height (20 pixel border times 2), then change your background color to black, and increase your canvas size again by 2 pixels in width and height.
 
Excellent solution foibly. :righton:

increase the canvas size by 40 pixels in width and height
That should only be 20 pixels i believe.
increase your canvas size again by 2 pixels in width and height
I think the border is only to be 1 pixel...?

You could also apply the normal "Stroke" filter under the EDIT menu, to create the 1 pixel border. Just record a "Select ALL" function first (Ctrl+A). Then Deselect after applying the Stroke filter.
 
Hey, thanks folks - such a quick response and on my first post too!
(Well, I knew it was an easy one but my expertise is in VB.Net rather than the dim , dark secrets of PS!)

I'm running out the door for a night on the town but will try it over the weekend!

Cheers,

Mike.
 
I tried extending the canvas size by 20 and setting the colour and it worked fine. However, when I try the same thing with the 1 pixel outer border I end up with only a border on the bottom and right hand side. (Yes, I clicked the correct icon to middle the image). If I try it with two pixels or more it works fine but one pixel (on a 720x480 image) doesn't seem to work. I can't use the Edit -> Stroke command as that's actually the one that Photoshop CS scripting doesn't support - so I need to work out what the problem is... could this be a bug?

Mike.
 
It can happen that a one pixel line isn't visible. This usually happens when you are looking at an image at less than full size. In that situation, Photoshop VISUALLY eliminates a number of pixels, so 1pix lines tend to get lost.
Of course this is not so when printing because that relies on what happens in the background.
Photoshop does not run on your screen, but inside your puter.

Keeping up appearances: makes it almost human, isn't it?
 
Hmm, good point - but even if it's possibly not visible in PS the 1px border didn't appear on the saved image either... if I browse it in IE6 it still doesn't show the border all the way around. Anyway, in the end I've settled for 2 pixels since there's almost no difference and it seems to work perfectly... guess sometimes 1 pixel just isn't enough for PS to work with.

Mike
 

Back
Top