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!

Fit image into shape.


PutinHuilo

Active Member
Messages
36
Likes
0
I have created following shape in Photoshop, now i need to load image and have that image automatically fit inside that shape. Can this be achieved with built in Photoshop tools or plugin?


Shape
shape.jpg

Image
1.jpg

Image fit to shape (note, shape does not crop the image, top part of image actually stretches to fit inside shape)
In other words image precisely fills the shape.
2.jpg
 

IamSam

Administrator
Staff member
Administrator
Messages
20,832
Likes
12,581
I have created following shape in Photoshop, now i need to load image and have that image automatically fit inside that shape. Can this be achieved with built in Photoshop tools or plugin?
Yes.

Easy with smart objects.
Shape converted to smart object....
Screen Shot 2022-02-14 at 11.23.24 AM.png
Image..
Screen Shot 2022-02-14 at 11.19.40 AM.png

Image in shape...
Screen Shot 2022-02-14 at 11.18.29 AM.png

New image in shape. Automatically updates...
Screen Shot 2022-02-14 at 11.30.44 AM.png
Screen Shot 2022-02-14 at 11.22.07 AM.png

You can edit the shape......
Screen Shot 2022-02-14 at 12.05.33 PM.png
 

IamSam

Administrator
Staff member
Administrator
Messages
20,832
Likes
12,581
What is the specific command that warps the image exactly into the smart object?
No direct command........it's just a matter of altering the shape after it's been converted into a smart object in free transform (warp). Like a mock up. I've actually explained this technique multiple times here over the years! I'll have to look them up.

I apologize for the fact that I have not explained "how" to accomplish the effect, I only answered the question at hand which was, "Can this be achieved with built in Photoshop tools". It's a time issue and I'm not sure if the OP wants an explanation.

This video is where I found the concept over 7 years ago! Just watch what he does with the smart object shape.
 

Rich54

Guru
Messages
1,475
Likes
2,885
Ahh... I figured it out after watching the video. I never knew of this technique. Very cool.
 

PutinHuilo

Active Member
Messages
36
Likes
0
Yes.

Easy with smart objects.
Shape converted to smart object....
View attachment 127571
Image..
View attachment 127572

Image in shape...
View attachment 127573

Thank you this method does indeed work, but not for my situation.

I already created shapes that i want to use and now i just want to be able to load my shapes and position image inside them. some shapes are more complicated like star and cannot reproduce it using free transform > wrap.
 

IamSam

Administrator
Staff member
Administrator
Messages
20,832
Likes
12,581
Thank you this method does indeed work, but not for my situation.
No, I expected that it wouldn't. I'm learning this about you! LOL!!

I already created shapes that i want to use and now i just want to be able to load my shapes and position image inside them.
I see. Other than using a clipping mask and warping the image to fit the shape..............you may be out luck using Ps.

some shapes are more complicated like star and cannot reproduce it using free transform > wrap.
I don't think you can get an image to conform/distort to the shape of a star. Even with the method I described above.

I myself don't know of any other Ps methods or plugins that may help you out.
 

PutinHuilo

Active Member
Messages
36
Likes
0
Yes.

Easy with smart objects.
Shape converted to smart object....
View attachment 127571
Image..
View attachment 127572

Image in shape...
View attachment 127573

New image in shape. Automatically updates...
View attachment 127575
View attachment 127574

You can edit the shape......
View attachment 127576
I don't understand how this works could you give example (better if its working PSD file), i did watch video and i cannot do it.

If i create shape or convert to smart object then smart object has rectangular shape and if i open smart object and draw outside the edges of shape (or place image over it) then shows trough inside working document as well.


Working document.
working-document.jpg


Smart object edit mode:
smart-object.jpg
 
Last edited:

IamSam

Administrator
Staff member
Administrator
Messages
20,832
Likes
12,581
I don't understand how this works could you give example (better if its working PSD file), i did watch video and i cannot do it.
You either understand the concept or you don't. A PSD file will not help you unless you understand how it's working.

If i create shape or convert to smart object then smart object has rectangular shape and if i open smart object and draw outside the edges of shape (or place image over it) then shows trough inside working document as well.
I can see by your image samples that you are doing something wrong. You have a distorted smart object document (PSB)............that's not how it's done!

I will explain this again, but it will not help with your original question!


Remember, we are working with two different documents! A PSD file and a PSB file. Not a typo!

This is a working PSD document.

Screen Shot 2022-07-19 at 9.50.13 AM.png

This is a shape within the PSD document.
Screen Shot 2022-07-19 at 9.50.01 AM.png

Convert the shape layer into a smart object.
We have two layers now, a BG layer and a shape layer converted into a smart object.
Screen Shot 2022-07-19 at 9.52.09 AM.png

Once the shape has been converted into a smart object, double click the SO/Shape thumbnail to open the PSB file.
Screen Shot 2022-07-19 at 9.59.46 AM.png

This is the SO/Shape layers PSB document.
It's just a white shape with NO edges! (The black you see is not part of the document, only the white!)
Screen Shot 2022-07-19 at 9.55.07 AM.png

Let's add an image to the shape in the PSB document
Screen Shot 2022-07-19 at 9.58.01 AM.png
Screen Shot 2022-07-19 at 9.58.12 AM.png

Save the PSB file by closing and selecting "save", or hit Cmd/Cntrl + S.

This is what the PSD document now looks like....
Screen Shot 2022-07-19 at 10.01.41 AM.png
Screen Shot 2022-07-19 at 10.02.22 AM.png

In the PSD document, lets distort the shape! DO NOT DISTORT THE SHAPE IN THE PSB DOCUMENT!
Screen Shot 2022-07-19 at 10.06.18 AM.png
Screen Shot 2022-07-19 at 10.06.27 AM.png

If we look back on the PSB document, it has not changed.
Screen Shot 2022-07-19 at 9.58.01 AM.png
Screen Shot 2022-07-19 at 9.58.12 AM.png
 

thebestcpu

Guru
Messages
2,346
Likes
2,185
@IamSam Thanks for reposting this technique. I don't know if I can use it yet it is very cool to effectivcely be able to save the Mesh transformation and apply to other images.

@PutinHuilo I took a look and see no easy automatic in PS or with an Addin to do what you want espectially "automatically). One would still have to create the base transformation to match the shapes your created.

One more are to look at is to use Edit > Puppet Warp. It gives quite a few degrees of freedom that the basic transformation tools do not. However, it is far from an automatic considering you still have to set up the initial transformation.

I would also like the tool which you seek you don't know of a source of such a tool

Best wishes on your continued search.
John Wheeler
 

Top