Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer position i am not getting extract position from psd #1

Open
mraj32 opened this issue Sep 8, 2014 · 6 comments
Open

layer position i am not getting extract position from psd #1

mraj32 opened this issue Sep 8, 2014 · 6 comments

Comments

@mraj32
Copy link

mraj32 commented Sep 8, 2014

Script is working fine for image coordinates but When i try to extract the layer position i am not getting extract position from psd. can you help me getting correct data from psd. attached is the value expected'default text layer' as 43, 60.77 but i am getting different position. Advance thanks

capture

@bronzehedwick
Copy link
Owner

Hi @mraj32, what is the incorrect number you're seeing on output?

@aziznatour
Copy link

I believe you have to rasterize all layers and layer effects to get the most accurate results.

@X-Raym
Copy link

X-Raym commented Feb 21, 2018

@bronzehedwick This script is awesome !

But I confirm the issue. The problem is that layerRef.bounds[0].value; only returns position of first pixel, it exclude a part of the layer (that you can see if you hit the Transform button.

demo

To reproduce you can create a smart object, and put a small rectangle inside it.

You will see that exported data match the layer box, but not the layer transform box (which have the initial placement of our image).

It would be nice if you can take a look, it seems that a solution is not as straightforward 😄

@bronzehedwick
Copy link
Owner

@X-Raym Thanks! And thanks for bumping the issue: I haven't had much time to work on this, but hopefully I'll be able to address this in the next few days.

@X-Raym
Copy link

X-Raym commented Feb 21, 2018

@bronzehedwick No problem ! Thanks for your quick answer !
The issue was also in the Photoshop API iteself, but r-bin made a script that overcome that:
https://forums.adobe.com/thread/2455423

There is a script function which solves this, maybe you will need to do that in a very different way, but maybe it can help a bit.

@bronzehedwick
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants