Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Resolution of Embeded Image(s) in Illustrator CS2



A pair of co-workers figured out that the pieces were there to allow for a
calculation to be done.

Getting the properties of raster item is where the info is:

tell application "Adobe Illustrator CS2"
	tell current document
		tell raster item 1
			get properties
		end tell
	end tell
end tell

These are the results:

{file path:file "Tigger:Users:speter3:Desktop:stamp.gif",
matrix:{class:matrix, mvalue_a:3.869469881058, mvalue_b:0.0, mvalue_c:0.0,
mvalue_d:3.869469881058, mvalue_tx:60.833984375, mvalue_ty:588.83203125},
bounding box:{0.0, 60.0, 134.0, 0.0}, color space:CMYK, embedded:true,
status:data from file, content variable:missing value, URL:"", layer:layer
1 of document 1, locked:false, hidden:false, selected:true,
position:{60.833984375, 588.83203125}, width:518.5087890625,
height:232.168182373047, geometric bounds:{60.833984375, 588.83203125,
579.3427734375, 356.663848876953}, visible bounds:{60.833984375,
588.83203125, 579.3427734375, 356.663848876953}, control
bounds:{59.833984375, 589.83203125, 580.3427734375, 355.663848876953},
name:"", blend mode:normal, opacity:100.0, isolated:false,
knockout:disabled, editable:true, sliced:false, visibility
variable:missing value, wrapped:false, wrap offset:missing value, wrap
inside:missing value, container:layer 1 of document 1, best
type:reference, default type:reference, class:raster item, index:1}

Here's the code to calculate the resolution/ppi:

tell application "Adobe Illustrator CS2"
	tell document 1
		tell raster item 1
			set boundWidth to bounding box's item 3
			set imageWidth to width
		end tell
		-------
		set theRes to boundWidth / (imageWidth / 72)
		-------
		theRes
	end tell
end tell

Stephan

> I'm trying to figure out a way to get the resolutions of  an embedded
> image in Illustrator CS2. In the app I can open the Document Info window
> and select Embedded Images from the pop-up and get the info. I can't
> figure out a way to get the info via AppleScript though. I'm looked thru
> the dictionary and the scripted guide and if it's there, I missed it.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Stephan
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/applescript-users/email@hidden
> Archives: http://lists.apple.com/mailman//archives/applescript-users
>
> This email sent to email@hidden
>

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

This email sent to email@hidden

References: 
 >Get Resolution of Embeded Image(s) in Illustrator CS2 (From: "stephan peterson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.