• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

need to collect image layer properties

New Here ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

Hello there,

I posted a previous question, though I need to be more specific,

I need to collect the bottom anchor position of an image layer (y value) on a psd document, so I can resize the main psd bottom center anchor (y) size to match this.

Once again, any info is greatly appreciated

TOPICS
Actions and scripting

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Jun 30, 2009 Jun 30, 2009

This will get the layer bounds..

var LB = activeDocument.activeLayer.bounds;
alert("Top = " +LB[1].as('px')+ " Bottom = " +LB[3].as('px')+ " Right = " +LB[2].as('px')+ " Left = " +LB[0].as('px'));

Votes

Translate

Translate
Adobe
Valorous Hero ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

This will get the layer bounds..

var LB = activeDocument.activeLayer.bounds;
alert("Top = " +LB[1].as('px')+ " Bottom = " +LB[3].as('px')+ " Right = " +LB[2].as('px')+ " Left = " +LB[0].as('px'));

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

great, now is there any easy way to adjust / move the top layer bound of an image layer?  Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

I highly recommend reading the JS Ref Guide sections for ArtLayer and Document in detail. Every entry.

The method you are looking for, in this case, is probably ArtLayer.translate().

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

LATEST

aye, will do a scan through, thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines