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!

Fill an empty space with image, like Transform (same ratio)


Celeste

New Member
Messages
1
Likes
0
Hello,

I am trying to find a quick way to have my images be stretched to the 4 corner of the empty space.
Like a "Fit to space" solution.
I usually do it manually with Free Transform (CTRL+T), snap the upper left corner of the image to the upper corner of the empty space, and then click and hold the lower right corner of the image to stretch it to snap to the corner of the empty space.

Is there a way to make it automatically in a single press button?

fit to space.png
 
Sorry for delay in responding - I don't think there's a one button solution for what you're asking.

What I would do is first, have the image of the flowers on a separate layer underneath the empty frame.
Using the move tool, center the image in the empty space as best as possible:

1677011533905.png

Now holding down that Alt key (Opt key on Mac), drag one of the corner boxes - the image will enlarge in both width and height at the same time:

1677011703853.png

Now you can again use the move tool, or continue to enlarge or shrink the image until is placed where you want it.

Click outside the image area and you're done.

1677012075818.png

If you're looking to batch process rather just a one-off, that's going to take some script building....

- Jeff
 
Hi @Celeste
Yes this can be done with a Photoshop Action that you record (I recorded an Action that works yet I am sure it would require debugging to work in all possible Layer Stacks).
Yet, creating and debugging this Action would take a bit of time and patience to make it work it all Layer Stack cases.
If you don't have a ton of these images, I prefer @JeffK approach as the time investment to build the Action may not be worth it to just follow the simple manual approach.
Just my opinion of course
John Wheeler

ADDED NOTES:

The Action worked in the simple case to two Layers, One with a transparent area and not transparent area and the second Layer with the image to expand into the transparency area completely (not preserving the aspect ratio).
This particular Action leaves the second Layer as a Smart Object. An additional Action Step could be take to rasterize it.
I did enough work where this is just a proof of concept.:

Starting image and Layer:

Screen Shot 2023-02-21 at 2.58.46 PM.jpg


Final Layers and Image:

Screen Shot 2023-02-21 at 2.57.59 PM.jpg
 
Last edited:

Back
Top