Copy link to clipboard
Copied
Hi all,
A relatively simple question but I'm struggling to find a sensible way to do it. Any help would be much appreciated.
I have lots of images, hundreds in fact, similar to the attached. I would like to swap the circles, each of which is an individual layer, with another image (a square).
Crazy utopia: some magical way to batch process this based on layer name
Real world hope: Is there a way to select a load of layers (e.g. all the circles) and then tell Photoshop to replace all of those layers with a particular image, presumably duplicated across the layers?
So that an image goes from this
To this
Ideas and mystical voodoo spells welcome!
Copy link to clipboard
Copied
Are you using smart objects?
Copy link to clipboard
Copied
Hi Stephen,
Thank you for replying. I'm not, they are just regular layers, but I'm not adverse to converting them if it helps
Copy link to clipboard
Copied
If you need to switch in content at volume you should not convert to Smart Objects mid-journey – you should start with Smart Objects.
And considering the images you might have chosen the »wrong« application altogether – looks like illustrator might have been a better choice.
But it might be possible to automate the task to some degree.
Please provide several layered sample images, at least one of them in both states (as-is and as-should-be).
Copy link to clipboard
Copied
Thank you. I inherited the images so unfortunately have to work with what I have.
Really appreciate this. I'll upload a couple of examples today.
Copy link to clipboard
Copied
I have just uploaded the file to another reply, in case you don't see this - here it is again:
In this example, figure A has been manually changed to the result I am looking for, and the old ellipse layers are simply switched off. I have about 300 files like this, and I'm hoping to turn every small ellipse into a small square.
Copy link to clipboard
Copied
So the affected Layers are Shape Layers – great
But they have been rotated (possibly even flipped) – c…p
Comparing the Vector Masks would have been fairly simple if it weren’t for the rotation.
Determining the rotation and counter-calculating it is obviously possible but, quite frankly, a bother and I am not completely sure about the flipping.
An alternative, if considerably slower, approach would be aligning all remotely matching Shape Layers (based of number of PathPoints for example) and checking the transparencies against each other (Quick Mask, Histogram, …).
Once one has determined which Shape Layers match one could convert each of that group to a Smart Object, relink them all to the same external file and then embed that.
@nathanf55210958 , how good are you with JavaScript and how much time are you willing to invest in this task?
Copy link to clipboard
Copied
Are they all the same size? Are the circles all in the exact same position?
If yes, and I have not tested so can't say for sure this would work, but:...
You'd want to save the edited images to a new location I'm thinking — just in case.
Copy link to clipboard
Copied
Thank you Trevor. Unfortunately there are hundres of images, each one with circles in rnadom places, that all need replacing with squares (or turning into squares, the are ellipses, if there is an action to turn every ellipse into a square, that would achieve the same thing.)
I'm uploading a PSD file here as requested previously. In this example, figure A has been manually changed to the result I am looking for, and the old ellipse layers are simply switched off. I have about 300 files like this, and I'm hoping to turn every small ellipse into a small square.
I've read about the creative AI being released in PS, I don't suppose that could help?
Copy link to clipboard
Copied
Please upload say 3 random examples of the original files and the replacement element/s.
Mockups don't help, the real, actual files are what is required to examine to develop a possible solution.
Copy link to clipboard
Copied
It is possible to change the Shape Layers of (practically) identical Vector Masks to the selected Shape Layer, even if rotated and flipped, to instances of one Smart Object via Script.
Once that is done one can easily change all the instances in one go (see screenshot 3).
But transfering the rotation and flipping to those SO-instances would seem like a bother, so it only would make sense for, in this case, the circles and squares.
Copy link to clipboard
Copied
@nathanf55210958 , is the issue still relevant?
Copy link to clipboard
Copied
I think I got a handle on rotations and flipping of the replaced Shape Layers, but as the bounds of a rotated shape (other than a square or a circle) are difficult to assess the rotation and repositioning are two steps and the script is accordingly far from fast.
Copy link to clipboard
Copied
7. In the document with the square image, arrange the duplicated layers in the desired positions and order.
8. Once you're satisfied with the arrangement, select all the duplicated layers in the document with the square image.
I think that is what the original poster wants to avoid – manually recreating the arrangement.
Copy link to clipboard
Copied
To swap multiple layers in Photoshop, you can use the following method. While it may not be fully automated, it is more realistic in the real world:
1. **Organize Your Layers**: Make sure all your circle layers are properly named and grouped if necessary. It will make the process more manageable.
2. **Prepare Your Square Image**: Open the square image you want to replace the circles with in Photoshop. Make sure it's the correct size and resolution.
3. **Place Square Image on Top**: Drag and drop your square image onto your document with the circles. This will create a new layer with the square.
4. **Position the Square**: Use the Move Tool (V) to position the square image over one of the circles. Make sure it's properly aligned and scaled to fit the circle.
5. **Clip the Square**: Right-click on the square layer and choose "Create Clipping Mask." This will mask the square to the shape of the circle beneath it. Repeat this process for each circle.
6. **Repeat for All Circles**: You'll need to manually repeat the above steps for each circle layer. If you have many layers, this can be a bit time-consuming.
7. **Delete Circle Layers**: Once you've replaced all the circles, you can select and delete the original circle layers.
This method should achieve the desired result but may require some manual work, especially if you have a large number of layers to replace. Photoshop doesn't have a built-in automated way to batch replace layers based on layer names directly.
Keep in mind that for a more automated solution, you might need to explore scripting in Photoshop, which can be quite advanced and may require programming skills. Photoshop's batch processing capabilities are generally more geared toward actions that affect the entire image rather than layer-specific changes.