5 Replies Latest reply on Sep 9, 2014 3:26 PM by Chuck Uebele

    CS5 Action - why can't I resize an image as an action *without resampling* ?

    Mouse Waver Level 1

      Hi

      First entry, so please excuse any faux pas.

      Am using PShop CS5 on a Macbook Pro - OSX 10.8.5

      I made an Action to batch resize some tiffs; I want to resize them by a given percentage without resampling. I don't need the file size to increase, I just want to enlarge to correct a mis-scaling.

      Photoshop will only do this if I make the action in 2 steps:

      1) the scaling up  and 2) a resample back down

      I had to put in stage 2 based on a test file, ie I noted what the resolution *would* be if resized without resampling, and manually added the resample stage. Why won't this work as an action when it can easily be done in 1 stage manually?

      Trying to find out why this wouldn't work as a 1-step action, I clicked the down arrow next to "image size" in the Action palette, it said "Width: 100%" instead of the percentage I'd entered in the Image size > Document size percentage field.

      But when I record the action as 2 stages, above, the percentage shows up correctly - it only seems to accept percentages to 1 decimal place, which is a bit of a shame, as I'd have liked to go to 3 decimal places which is possible in many Adobe dialogs.

       

      I tried running the action with the files open and as file > automate > batch; the 1-stage action did not work either way.

       

      Would be interested to know if anyone else has encountered or fixed this -

      thanks

        • 1. Re: CS5 Action - why can't I resize an image as an action *without resampling* ?
          JJMack Most Valuable Participant

          All you should need is a single Image size step where resample is not check and you pull down and select Percent as the change units. The you enter the percent you wand in the width or height. the top section should be grayed out because you not interpolating the image so no pixels will change. Other  Options like constrain and interpolation are also not available. All that will change is the image DPI print resolution setting. The Image will still be the same image have the same pixels and aspect ratio all the changes is the print size.

           

          You wrote "I just want to enlarge to correct a mis-scaling." If by miss-scaling you mean the current image is not the correct size and has a different aspect ratio then the image  you want you need two steps.  The percentage change to bring it to with the print size you want then a Canvas size step to add the missing pixels so the image has the correct aspect ratio with canvas addec to two if its sides

          • 2. Re: CS5 Action - why can't I resize an image as an action *without resampling* ?
            Chuck Uebele Adobe Community Professional & MVP

            I see what you mean. The action does not seem to record that you have resampling turned off, and just assumes that you want the image at 100%. Only way I know to get around this is with a script. The below script will resize an image to 10 inches in width, but not resample the image.  You have to use pixels as units. So the first undefined is the width, and the second is the height.  By entering "undefined" it tells PS to adjust those values to whatever value you did enter.  In this case, in the resolution slot, I out the image width divided by 10, which will put the width at 10".  You could make a script that test for vertical or horizontal and use whatever size you want. 

             

            #target photoshop;

            var doc = activeDocument

            app.preferences.rulerUnits = Units.PIXELS

            doc.resizeImage(undefined,undefined,doc.width/10,ResampleMethod.NONE);

            • 3. Re: CS5 Action - why can't I resize an image as an action *without resampling* ?
              Mouse Waver Level 1

              Thanks JJMack

              I agree, that's just what I was trying to do!

              Below is a screen shot of the result when I tried it: I was entering 183.3% in both cases, but unless I selected "resample image" it would just resize to Width:100% no matter what I typed in.

              Screen Shot 2014-09-09 at 20.57.30.png

              • 4. Re: CS5 Action - why can't I resize an image as an action *without resampling* ?
                Mouse Waver Level 1

                Wow, thanks csuebele, I am not familiar with scripts and have so far only used a few in InDesign, but would like to learn more.

                I see there's a scripting guide pdf in the PShop application folder.

                Would I use AppleScript for this?

                • 5. Re: CS5 Action - why can't I resize an image as an action *without resampling* ?
                  Chuck Uebele Adobe Community Professional & MVP

                  Yes, there is a scripting guide, so you can do just simple scripts like the one I posted and then make more complicated ones. I would use javascript rather than Applescript. There are more people who know javascript and can help if you run into issues. Also javascript is cross platform, where as VB and Applescript aren't.