All is does is resize the canvas.Īpp.lerUnits = Units.PIXELS ĭesc11.putUnitDouble( idWdth, idPxl, lSide ) ĭesc11.putUnitDouble( idHght, idPxl, lSide ) ĭesc11.putEnumerated( idHrzn, idHrzL, idCntr ) ĭesc11.putEnumerated( idVrtc, idVrtL, idCntr ) ĮxecuteAction( idCnvS, desc11, DialogModes. Then you want the image to be a 1:1 aspect ratio, so that would mean increasing the canvas size, rather than resizing the image to the longest dimension. So according to your last post, it looks like you're trimming rather than "cropping." So you don't actually want to crop into the image. Var idpureAspectRatio = stringIDToTypeID( "pureAspectRatio" ) ĭesc6.putEnumerated( idcropAspectRatioModeKey, idcropAspectRatioModeClass, idpureAspectRatio ) ĮxecuteAction( idCrop, desc6, DialogModes.NO ) Var idcropAspectRatioModeClass = stringIDToTypeID( "cropAspectRatioModeClass" ) Var idcropAspectRatioModeKey = stringIDToTypeID( "cropAspectRatioModeKey" ) Var sSide = parseInt(Math.min(doc.width,doc.height)) ĭoc.resizeImage(lSide,lSide,undefined,ResampleMethod.BICUBIC) ĭesc7.putUnitDouble( idLeft, idPxl, x1 ) ĭesc7.putUnitDouble( idBtom, idPxl, y2 ) ĭesc7.putUnitDouble( idRght, idPxl, x2 ) ĭesc6.putUnitDouble( idAngl, idAng, 0.000000 ) Var lSide = parseInt(Math.max(doc.width,doc.height)) The Dialog will not display when the action is played the script records the settings you used recording the action into the Actions step when the action is played these setting are used the script bypasses displaying its dialog so the action can be batched. When recording the Action the scripts Dialog will look like this. More then a dozen Scripts for use in actions.Sample Actions.txt Photoshop CraftedActions set saved as a text file.CraftedActions.atn Sample Action set includes an example Watermarking action.Action Enhanced via Scripted Photoshop Functions.txt. It in my crafting actions package with along with other script I wrote for use in Action the Adobe introduce a bug in CC 2015.5 that requires you to add garbage to documents metadata to get around the bug otherwise my run twice scripts will be bitten by Adobe designer Bug.Ĭrafting Actions Package UPDATED Added Conditional Action steps to Action Palette Tips. It can make selections or Paths that are rectangle or ovals that have the aspect ratio you need. You can use my Plug-in script in your action. A dialog box will open asking which file you want. After selecting the folder, the script will run so, sit back and wait. A dialog box will open asking which folder you want the script to run on. No your Action need to make the 1:1 the will be very easy to do if a centered 1:1 crop or a 1:1 crop from the top left corner will be acceptable. Select which script file that you want to run.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |