uxp-photoshop-plugin-samples
uxp-photoshop-plugin-samples copied to clipboard
box size is wrong in layer creation sample
https://github.com/AdobeDocs/uxp-photoshop-plugin-samples/blob/main/layer-creation-js-sample/index.js has, as part of the batchplay,
"bounds": { "_obj": "rectangle", "top": 100, "left": 100, "bottom": 400, "right": 500 }
gives me a box 1667 pixels wide and 1250 tall. I've screenshotted it next to the rulers.
If I change the top and left to 0.0, the box gets bigger. It's now 2083 x 1667, which given that's one of the same numbers as before, says there is a scaling issue somewhere.
I found this out when I was attempting to produce and centre other boxes on defined points, so it is just possible I did something to my instance of Photoshop, such as over-writing the anchor points, that has made this happen. I recorded the orginal change as an action and exported JavaScript to use. However, I've closed and re-opened Photoshop, to no avail. In either case, I think it should not be happening. I'm afraid I can't test it in a pre-Action-copy-and-paste state.
Looking at the relative sizes, it seems to be an issue with 300ppi vs 72ppi. The docs say that everything should be in 300 ppi, but I suspect that somewhere is a conversion to 72 which is not fully converted back.