Is there a “proper” (mathematical if you will) method to resize an image fit the canvas?
My image is a rectangle with same aspect ratio as the canvas.
I usually use the snap and judgements to fit but it never feels right and there are always some unwanted compromises.
Note: I m not looking for changing canvas size to fit the image. I m looking for changing image size to fit the canvas in the rightest way.
Hello @Lotus_Red , and welcome to the forum.
I think you can use the Transform Tool to resize your image as canvas size.
And also, as you said that your image has the same ratio as your canvas so, you can hold the Shift key while increasing the image size then it will not change image ratio.
Hope it will helpful.
Add/Edit:
something like this, {here my canvas size is 1080x1080 and image 898x898}
{note that you hold the Shift key while dragging}
…K . A . B . H .
I’m confused, the image size is the canvas size. Do you mean a selection or transformation?
Either way, if dragging and snapping are too imprecise you can often set the exact values for scaling and coordinates via tool options docker, depending on the tool.
It’s probably an image with size S1 pasted in a layer for which document have a size S2
Grum999
There’s Image → Scale Image to New Size you can use with the ‘small’ picture open in another document initially, then there’s Layer → Transform → Scale Layer to New Size.
Why doesn’t it feel right? What are these compromises?
If you have problems then you need to explain them or show illustrative screenshots.
I know about Transform Tool and shift key trick. It works well to keep the aspect ratio but it does not ensure the resizing it to the right size as the canvas. Just like in your video, you used your “judgement” and “snap-to-border” to stop resizing (dragging). While that is raw method to do it but isn’t perfect. There can always be errors on pixel level.
Tnx for replying.
I imported the png image of size 5760x3240 px as a new layer.
And the canvas size is 1920x1080 (3x smaller than the image).
Now, when the image transform function is active (shows the rectangle around the image), the tools options does show scaling but in percentage % and not in px. Or did i miss something? Pl see image attached.
Now, it may not be always that my image is exactly 3x larger than the canvas. It could vary. So calculating the percentage change may not be practical every time. I need an exact method to rescale it to fit the canvas size.
Tnx for replying.
Right. My image is say (S1) 5760x3240 px and canvas size is (S2) 1920x1080 px. Same aspect ratio but different size. Image is imported as a new layer.
Tnx for clarifying.
So the solution is to follow @AhabGreybeard answer: use layer > scale layer to new size
The problem after this, the resized layer position is probably not what you want.
You’ll have to select Move tool, and in tools options docker, fix position to x=0, y=0
Grum999
You partially gave me the answer i was looking for but @Grum999 completed it so marking his reply as the Solution. But thank you very much for replying. It helped a lot.
So, if i have an over sized (or undersized) image imported as a layer and i want to fit it to canvas,
-
Precisely Resize it by using:
“Layer → Transform → Scale Layer to New size…”
-
Precisely position it by using:
“Ctrl+T or Transform tool”
Go to tool options docker, and select Position radio button
Change the origin to top left
Change the position x,y to 0,0 respectively.
(see image)
OR
2. Move tool (T) → Change Position x,y to 0,0 respectively. This is faster.
(see image)
Thank you for answering.
Sorry for disturbing,
I think this solution is also important for.
@Lotus_Red Thanks a lot for making this topic.
…K . A . B . H .
@Studio-Kyubo Tnx for encouraging and you are not at all disturbing.
On the contrary, i m grateful to you for making sincere efforts (like making video sample) to help people like me.
Well, I did not choose my answer as the solution* because i wanted to give the credit where it was due. But yes, i posted it with screenshots because it may guide someone better.
Tnx again.
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.