Skip to main content
Known Participant
May 19, 2020
Frage

Create action to put white frame around photos?

  • May 19, 2020
  • 5 Antworten
  • 3462 Ansichten

This can't be that hard, any tips would be appreciated.

I have about three hundred photos. I want to put a white frame/border around each one. The pictures are different width and heights. I need the frame to be constant relative to the dimensions of the picture.

I tried doing a percent increase to the canvas with a white background but that gives different results depending on the dimensions.

Anyone have any ideas. I need to automate it with an action.

Thanks

Dieses Thema wurde für Antworten geschlossen.

5 Antworten

Known Participant
May 21, 2020

Wow.

Thank you for all the replies. I probably should have been more descriptive in my original post.

I have an assortment of photos that I scanned into the computer. They are all jpg's flattened with different aspect ratios. My goal is to create an action that will put a white border around each image with the same width on each side and then close the picture.

I want to use the Image Processor to batch process a whole folder. Its been almost twenty years since I've dealt with actions and automating a process.

 

I think I cracked the action part except I can't get the action to close the image without bringing up a "save as dialog". I'll keep trying.

Thanks again for the replies!

c.pfaffenbichler
Community Expert
Community Expert
May 21, 2020

Could you please post a screenshot with the pertinent Panels (Toolbar, Layers, Channels, Options Bar, …) visible? 

 

jpg does not support Layers, so if the image contains any Layers apart from the Background Layer the jpg cannot be simply saved, but one could flatten the image. 

 

But opening a jpg, editing and saving it is not a great idea because of the accumultaed compression damage. 

c.pfaffenbichler
Community Expert
Community Expert
May 19, 2020

Layers? Just a Background Layer? 

 

• reset back- and foreground color (D)

• change Background Layer to a regular Layer

• apply Layer Style Stroke set to »Outside«

• Image > Reveal All 

• Flatten Image 

 

Edit: But maybe I misunderstood the original post. 

Stephen Marsh
Community Expert
Community Expert
May 19, 2020

As JJMack wrote, using a relative canvas extension would do the job. If you use a fixed unit such as pixels or CM then you would not need to worry about different aspect ratio's distorting the frame as you are not basing the extension on %. The following example would add a 25 px border around each edge and the result would be consistent no matter the aspect ratio.

 

 

Are the input files layered or flattened, or a mix of both? Do all of the input files have a consistent PPI and physical size set in image size?

 

If you have layered files or a mixture of flattened and layered files, then a conditional action can route the processing as required.

Known Participant
August 7, 2020

Where can I find this pop up box 'add uniform white frame'?

c.pfaffenbichler
Community Expert
Community Expert
August 7, 2020

What are you talking about? The screenshot shows the Actions Panel.  

 

Have you tried Image > Canvas Size set to »Relative«? 

Bojan Živković11378569
Community Expert
Community Expert
May 19, 2020

Do you want same stroke width around photo? And to vary width based on image dimensions? It is harder than you think using actions. There isn't option for such thing because aspect ratio is different from what I can understand. You can achieve same stroke width using percentage when recording action for 1:1 aspect ratio but that won't work if you run action on image with 5:3 aspect ratio and you can not use conditional actions to check whether image has 5:3 or 3:2 ratio.

JJMack
Community Expert
Community Expert
May 19, 2020

Make sure the documents have a background layer for they does not support transparency. Then record a simple action that add canvas relatively  the same fixed percentage for  current width and height  If the images have a 1:1 aspect ration the canvas added to the top and bottom will be the same size as the canvas added to the left and right sides. You can specify the color of the canvas you want added.

JJMack