Re: Get property size
Re: Get property size
- Subject: Re: Get property size
- From: Christopher Stone <email@hidden>
- Date: Sat, 18 Jan 2014 12:10:19 -0600
On Jan 18, 2014, at 11:12, Robert Poland <email@hidden> wrote:
I’m trying, using Applescript, to get the size of an image.
______________________________________________________________________
Hey Bob,
tell application "Finder" set sel to selection as alias list if sel ≠ {} then set f to first item of sel {size, physical size} of f end if end tell
Size is the actual size of the image.
Physical size is the size of the image on disk.
You can also use 'mdls':
set f to quoted form of (POSIX path of f) set _cmd to "mdls " & f & " | egrep -i \"size\"" do shell script _cmd
Are you perhaps looking for the dimensions of the image rather than the size?
mdls /Users/chris/Desktop/image.jpg |egrep -i "pixel"
OR
tell application "Image Events" set _image to open f set imgProp to properties of _image close _image imgProp end tell
-- Best Regards, Chris
|
_______________________________________________
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