action repeating image on all sides

MM
Posted By
Marek_Mularczyk
Aug 26, 2008
Views
324
Replies
8
Status
Closed
I am trying to create an action that takes one image and repeats it on all four sides to make a square (we are picture framers and am trying to create image files of our frames from one picture of a piece of frame). I have managed to create the action to do this, but some of the frames are different widths and if I set the action to go on a smaller frame it doesn’t push the image up to the edge of the canvas. It leaves a white space between the edge of the image and the edge of the canvas.

I tried to set the point of origin with co-ordinates in the transform mode when creating the action, to make sure that every image went where I wanted it to, but this hasn’t worked.

Do you know of any way that I can paste an image into a new canvas and pin point where I want that image to go?

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

P
Phosphor
Aug 26, 2008
Have you tried using the align functions to move the images so that they’re flush with the edges?

The advantage with using the align functions is that it wouldn’t matter if the frame pieces are different sizes, because the location to which their moved wont be dependent on absolute values for determining where they’ll end up.

Also, how about posting links to 2 different sizes of frame elements that you’re trying to do this with, as well as an image showing with one of them what you want to end up with for all of them.
JM
J_Maloney
Aug 26, 2008
Align layers.

Copy/paste to master doc which is very big, and square. It already has four selection channels on it that crop the four frames.

Duplicate pasted (frame) layer. Rotate 90 degrees. Select both layers’ transparency. Crop. Align original frame to (left) side of canvas. Align rotated to top of canvas. Duplicate and flip both and align right bottom. Use pre-made master masks to crop each frame. Then use all four layers to create a selection and drop a black layer with this selection at the bottom (to cover up holes in your masks). I also would add a drop shadow to two of the frames.

This way all you need is a frame section (facing the proper direction! – you could create two actions or just flip it before you run the single action). As long as it is less than 1/2 as wide as it is tall, the action should work and return nice results.

J
P
Phosphor
Aug 26, 2008
Something else to consider when doing this:

The lighting of the starting frame element—with its inherent shadows and highlights—will look wrong on the other 3 digitally rotated frame elements.

Me, personally, I couldn’t abide that. I’d rather put together one example of each frame and shoot them that way.
PR
Paul_R
Aug 26, 2008
How about a simple script?

#target photoshop

var startRulerUnits = app.preferences.rulerUnits;

app.preferences.rulerUnits = Units.PIXELS;

var doc = activeDocument;

doc.selection.selectAll();

doc.selection.copy();

app.activeDocument.resizeCanvas(doc.width*2, doc.height*2, AnchorPosition.TOPLEFT);

doc.paste();

doc.selection.selectAll();

align(‘AdRg’);

align(‘AdTp’);

doc.activeLayer.rotate(90);

doc.paste();

doc.selection.selectAll();

align(‘AdRg’);

align(‘AdBt’);

doc.activeLayer.rotate(180);

doc.paste();

doc.selection.selectAll();

align(‘AdLf’);

align(‘AdBt’);

doc.activeLayer.rotate(-90);

doc.selection.deselect();

app.preferences.rulerUnits = startRulerUnits;

function align(method) {

var desc = new ActionDescriptor();

var ref = new ActionReference();

ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );

desc.putReference( charIDToTypeID( "null" ), ref );

desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );

executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );

};
P
Phosphor
Aug 26, 2008
Nice effort on the script, Paul.

But I’d still balk at having mismatched lighting.
JM
J_Maloney
Aug 27, 2008
At least it’s rotationally symmetric.

Phos’ point is a good one. You could play with curves and gradient masks to normalize the lighting, and another set in your action to simulate a new light source.

J
P
Phosphor
Aug 27, 2008
I always get kind of a frustrated kick out of how a bunch of us can swoop in and rip apart a question and solve it 8 ways from Sunday, plus bring up and hash out tangential issues before the O.P. ever returns. The frustrating part is if they only return and say what amounts to "Thanks, smell ya later!" or don’t return at all.

I’m here for the damned dialogue, man! And be quick about! Pip pip!

🙂
C
Curvemeister
Aug 27, 2008
Newbs definitely need more training before they ask their questions – 🙂

Seriously, 9 out of ten answers I give never get any response – that’s part of the game.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections