The image size result in UXP is not the same as ps and JS

The same psd file: width: 2400 pixels, height: 1500 pixels, resolution 300 pixels/inch, the image size in UXP is different from ps and JS.
A: Image size in JS: The result is: width: 2032 pixels, height: 1270 pixels, resolution: 254 pixels/inch
Code: activeDocument.resizeImage(activeDocument.width,activeDocument.height,254)

B: Image size in UXP: The result is: width: 2400 pixels, height: 1500 pixels, resolution: 254 pixels/inch
Code: const app = require(“photoshop”).app;
const activeDoc = app.activeDocument;
await activeDoc.resizeImage(activeDoc.width, activeDoc.height,254);

C: Image size in ps: the result is: width: 2032 pixels, height: 1270 pixels, resolution: 254 pixels/inch

1 Like