• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adobe Photoshop Bounds of a layer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adobe Photoshop Bounds of a layer?


  • Subject: Re: Adobe Photoshop Bounds of a layer?
  • From: "koenig.yvan" <email@hidden>
  • Date: Thu, 04 Sep 2014 13:43:44 +0200


Le 04/09/2014 à 12:05, Dave <email@hidden> a écrit :


On 3 Sep 2014, at 00:02, Martin Orpen <email@hidden> wrote:

On 2 Sep 2014, at 08:05, Dave <email@hidden> wrote:

It seems that bounds is specified to be Top, Left, Bottom,Right (old pre MacOS X style Rects), my question is, to correctly calculate the Width and Height, should the code be:


Photoshop’s layer bounds are Left, Top, Right, Bottom

So

width = bounds[3] - bounds[1]
height = bounds[4] - bounds[2]

Hi Martin,

Thanks for taking the time to answer.


I don’t understand this, surely it’s:

bounds[0] = Left (or top?)
bounds[1] = Top (or left?)
bounds[2] = Right (or bottom?)
bounds[3] = Bottom (or Right?)

Does the array start at 0 or 1?

I can’t seen to find it written in stone anywhere - if you know where Bounds is defined I’d be grateful if you could point me to it.

I just want to be 100% certain I’ve got the right coordinates because I’m seeing some strange behaviour.

Thanks a lot for your help,

Dave

Hello

Martin's answer seems to be clear.
bounds is {Left, Top, Right, Bottom}
which is the definition used by most applications (including the Apple ones which I'm aware of)

As I don’t own Photoshop, I searched in Google fro Photoshop AppleScript
One of the answer gave me this link :

http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop-cc-applescript-ref.pdf


bounds
list
The area to crop (unit value).
A list of four coordinates that
mark the portion remaining
after cropping, in the following
order: left, top, right, bottom

According to that,
set theBounds to bounds of « the target object »
set theWitdth to item 3 of theBounds - item 1 of theBounds
set theHeight to item 4 of theBounds - item 2 of theBounds


Yvan KOENIG (VALLAURIS, France) jeudi 4 septembre 2014 13:43:39



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Adobe Photoshop Bounds of a layer?
      • From: Shane Stanley <email@hidden>
References: 
 >Adobe Photoshop Bounds of a layer? (From: Dave <email@hidden>)
 >Re: Adobe Photoshop Bounds of a layer? (From: Martin Orpen <email@hidden>)
 >Re: Adobe Photoshop Bounds of a layer? (From: Dave <email@hidden>)

  • Prev by Date: Re: Adobe Photoshop Bounds of a layer?
  • Next by Date: Re: Adobe Photoshop Bounds of a layer?
  • Previous by thread: Re: Adobe Photoshop Bounds of a layer?
  • Next by thread: Re: Adobe Photoshop Bounds of a layer?
  • Index(es):
    • Date
    • Thread