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

**URL:** https://forums.creativeclouddeveloper.com/t/the-image-size-result-in-uxp-is-not-the-same-as-ps-and-js/3462
**Category:** Photoshop
**Created:** [August 6, 2021, 9:16am UTC](https://forums.creativeclouddeveloper.com/t/the-image-size-result-in-uxp-is-not-the-same-as-ps-and-js/3462 "2021-08-06T09:16:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zyyclove](https://avatars.discourse-cdn.com/v4/letter/z/ad7895/32.png) [@zyyclove](https://forums.creativeclouddeveloper.com/u/zyyclove)
#### Post date: [August 6, 2021, 9:16am UTC](https://forums.creativeclouddeveloper.com/t/the-image-size-result-in-uxp-is-not-the-same-as-ps-and-js/3462/1 "2021-08-06T09:16:08Z")

</div>

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
