Re: Reported Size issue in PSCS2
Re: Reported Size issue in PSCS2
- Subject: Re: Reported Size issue in PSCS2
- From: Stan Cleveland <email@hidden>
- Date: Mon, 16 Oct 2006 13:12:04 -0700
- Thread-topic: Reported Size issue in PSCS2
On 10/16/06 12:54 PM, Oakley Masten wrote:
> Why don't I get the correct answer [actual size] when
> I run this scriptlet?
>
> tell application "Adobe Photoshop CS2"
> set ruler units of settings to pixel units
> set HowTall to round (height of current document as
> number)
> set HowWide to round (width of current document as
> number)
> display dialog "How Tall = " & HowTall & return &
> "How Wide = " & HowWide
>
> end tell
>
> Result
>
> HowTall = 485
> HowWide = 485
>
>
> Actual image size is 2020 x 2020 Pix at 300 ppi
>
> I can't figure this on out.
Even though you're setting the ruler units to pixels, Photoshop is returning
your canvas width and heigth in points. (That may be the result of some
other preference setting.) You can get the correct values by coercing each
measurement as it is captured, like this:
tell application "Adobe Photoshop CS2"
set HowTall to round (height of current document as pixels)
set HowWide to round (width of current document as pixels)
display dialog "How Tall = " & HowTall & return & "How Wide = " &
HowWide
end tell
Stan C.
--
"There are two types of complex systems: those that have grown out of
simpler systems and those that do not work." -- Unknown
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden