Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Resize a Layer to specific pixel size?

Community Beginner ,
Jan 06, 2021 Jan 06, 2021

Hello everyone,

 

If I have 2000px x2000px canvas and place 4 images, so I have to resize all the images to 1000px x 1000px, how can I resize without useing free transform tool? I tried to transform from properties pannel, but since all 4 images are embedded smart object, it seems it won't work. I usually create a 1000px x 1000px box and mask an image, but wondering if I can resize an layer image directly. 

 

Please advise me!

Thank you so much. 

1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Jan 06, 2021 Jan 06, 2021

When you are in the middle of a Free Transform on a layer you can see values for Width and Height in the Options bar. You aren't restricted to the units that it is displaying. If you selected the contents of the Width field, for example, you could type in 50% or 1000px or 2in or 60mm etc…

 

I appreciate that you said that you are not wanting to use the Free Transform tool. I thought knowing this functionality, if you didn't already, may change your intended workflow.

Translate
Engaged , Jan 06, 2021 Jan 06, 2021

Also... CTRL T on the image layer and enter the measurments in the top bar type 1000px instead of % 🤣🤔😮

Translate
Adobe
Engaged ,
Jan 06, 2021 Jan 06, 2021

What is wrong with the free transform tool? 🤣

I would just open the images seperately and save copies at 1000 x 1000 and drag those in. 🤷🏼‍:male_sign:

I suppose you could click with the rectangle shape tool and create 1000x1000 boxes and clip images into those but you still have to scale them 🤣🤷🏼‍:male_sign:

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 06, 2021 Jan 06, 2021

Also... CTRL T on the image layer and enter the measurments in the top bar type 1000px instead of % 🤣🤔😮

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 06, 2021 Jan 06, 2021

Thanks for your reply! I didn't know that I can actually type in pc instad of %. That is a game changer, thanks a lot!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2021 Jan 06, 2021

When you are in the middle of a Free Transform on a layer you can see values for Width and Height in the Options bar. You aren't restricted to the units that it is displaying. If you selected the contents of the Width field, for example, you could type in 50% or 1000px or 2in or 60mm etc…

 

I appreciate that you said that you are not wanting to use the Free Transform tool. I thought knowing this functionality, if you didn't already, may change your intended workflow.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 06, 2021 Jan 06, 2021

Thank you so much sharing your tips! I didn't know that values of width and height on top bar is not resticated to the units. I'm wondering why we cannot use properties panel for an embeded smart object image. Just curious about it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2021 Jan 06, 2021

Thank you. Hope it helps.

 

Adobe keep updating the capabilities of the Properties panel across all of their programs. Perhaps in the future you will be able to make that change from there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021

If you have an embedded SO, editing the SO and changing the .psb file's image size and saving will update the layer size. You can also use the Fit Image command.

 

Note: I have only mentioned these methods for completeness, they are destructive and you can't resize multiple times as you can with the smart object layer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021
LATEST

You can use this script to enter a new width in pixels, the height will scale proportionally.

 

// https://forums.adobe.com/message/11043978#11043978
(function () {
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var bounds = activeDocument.activeLayer.bounds;
    var width = bounds[2].value - bounds[0].value;

    // Loop the input prompt until a number is entered
    var newWidthIn;
    while (isNaN(newWidthIn = prompt("Enter a new width in pixels:", "300")));
    // Convert decimal input to integer
    var newWidth = parseInt(newWidthIn);
    // Test if Cancel returns null, then do nothing
    if (newWidth === null) { return }
    // Test if an empty string is returned, then do nothing 
    if (newWidth === "") { return }

    var newSize = (100 / width) * newWidth;
    activeDocument.activeLayer.resize(newSize, newSize, AnchorPosition.MIDDLECENTER);
    app.preferences.rulerUnits = startRulerUnits;
})();  

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines