3 Replies Latest reply on Apr 17, 2018 7:15 AM by JJMack

    Batch Crop Problem

    retouch 2y76015683

      Hello,

       

      I´m using the newest version of PS CC and i am having a problem with my Batch crop.

      I want to apply the same aspect ratio to a bunch of pictures. I wrote an simple action for that task. Sometimes the cropping has to be adjusted but most of the time its centered and maximized. Since all the pictures have a different resolution, the cropping area is all over the place and different with every picture. I have to scale the cropping area by hand every picture. I have tried changing the cropping tool from aspect ratio to pixel ratio but it doesnt fix it. I dont have the option to change the picture size beforehand because the pictures mustn't be changed, so big pictures have to stay big and small ones small.

      Is there a way that the cropping tool area is centered and cropped to the maximum size as default even if the pictures have different sizes?

        • 1. Re: Batch Crop Problem
          JJMack Most Valuable Participant

          You may want to download my crafting  actions package.  In it I include  a plug-in  AspectRatioSlection that cans used followed by image crop to do your centered crop.  However I programmed the plug-in not to change a document orientation.  Of if you record a 1 1 ratio it will set a centered  square selection.     However if you record an aspect ratio  like  1 2 the plug-in will set a centered  2:1 landscape selection for Landscape images and a 1:2  Portrait selection for Portrait  images.   For cropping a Landscape to portrait or Portrait to landscape does not work well too much content will be lost and the resulting composition will most likely not be acceptable.

           

          The Plug-in can set rectangle or elliptical selections or path.

           

          However Adobe added a bug into Photoshop scripting in CC 2015.5  that caused the run twice script fail to work corrected.  However you can work around the bug by adding Garbage into the info instruction metadata file.  I use Open document and New Document script even manager events toe do that.  They run this script.

           

          Garbage.jsx

          if (app.activeDocument.info.instructions.indexOf("Garbage") == -1 ) app.activeDocument.info.instructions = app.activeDocument.info.instructions + "Garbage";

           

           

          Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.

          Contains

          Example

          Download

          • 2. Re: Batch Crop Problem
            retouch 2y76015683 Level 1

            Thank you for your help, but with this script/action I cant fine-tune my crop selection. Like I said, some of the Pictures dont fit and I have to scale them bigger (i have white background). Isnt there a way to use the selection as a default crop and only if i hit enter the action continues (the option for the dialog box for the crop is not available) ?

            • 3. Re: Batch Crop Problem
              JJMack Most Valuable Participant

              https://forums.adobe.com/people/retouch+2y76015683  wrote

               

              Thank you for your help, but with this script/action I cant fine-tune my crop selection. Like I said, some of the Pictures dont fit and I have to scale them bigger (i have white background). Isnt there a way to use the selection as a default crop and only if i hit enter the action continues (the option for the dialog box for the crop is not available) ?

              You did not read all the Action Tips.

               

              The Script should automatically set the largest centered aspect ration selection possible for each image processed. The selection will be sized for the image. If you wish to be able to fine tune the selection before the crop is done you can add in an interactive step to do that.  All you need do is record a menu Select>Transform selection step where you rotate the selection 180 degrees after you record the Aspect Selection Ratio step.  Followed  that setp with the Image Crop step.  You make that Transform selection step interactive by turning on that steps dialog in the action by adding the checkmark in the step.   When the action is played after the Plug-in sets the selection you will be in an interactive  transform Selection step.  If the selection set is acceptable all you need do is hit enter.  If you need to tweak the selection you can drag the selection to move the selection or hold the Shift or Shift and Alt keys and drag a corner the maintain the current aspect ratio and make the selection smaller for a tighter smaller crop.  when you press enter to commit the transform the next step will crop the image.  If you mess up the selection transform you can hit ESC instead to cancel the transform. Then press play the Aspect Ratio Selection will be reset and you can then try again to transform the selection correctly.

               

              However, If  you batch that action the step will still be  an interactive step which is not approbate for an automated batch process it would be more assisted interactive process.