Re: Trying to get image dimensions
Re: Trying to get image dimensions
- Subject: Re: Trying to get image dimensions
- From: Jenni via AppleScript-Users <email@hidden>
- Date: Tue, 2 Jun 2020 20:11:52 -0700
> On Jun 2, 2020, at 7:05 PM, Shane Stanley via AppleScript-Users
> <email@hidden> wrote:
>
> The ASObjC version would be:
>
> use AppleScript version "2.5" -- macOS 10.11 or later
> use framework "Foundation"
> use scripting additions
>
> set k to "Macintosh SSD:Users:shane:Desktop:Fjords.tiff"
> set imagePosixPath to POSIX path of k
> set theImageRep to current application's NSBitmapImageRep's
> imageRepWithContentsOfFile:imagePosixPath
> set fileHeight to theImageRep's pixelsHigh()
> set fileWidth to theImageRep's pixelsWide()
Works perfectly, Shane. Thanks for the alternative.
Frank
_______________________________________________
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