imageResize - Proportional resize

Hiya,

I’m finally dipping my toe into UXP after lots of CEP experience and I’ve quickly come up against something that I’m hoping someone can shed some light on.

In ExtendScript I could pass null to a resizeImage method for one of the pixel dimensions and resize an image proportionally. I can’t seem to do the same in UXP, it seems that now both dimensions need to be explicitly stated in pixels.

Am I missing something?

In BatchPlay, there seems to be a property called constrainProportions for the imageSize event:

photoshop.action.batchPlay(
[
   {
      "_obj": "imageSize",
      "width": {
         "_unit": "pixelsUnit",
         "_value": 600
      },
      "scaleStyles": true,
      "constrainProportions": true,
      "interfaceIconFrameDimmed": {
         "_enum": "interpolationType",
         "_value": "nearestNeighbor"
      },
   }
],{});

Simon,
apologies for my tardy response. This is perfect, thank you.