• 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: Get Resolution of Embeded Image(s) in Illustrator CS2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: Get Resolution of Embeded Image(s) in Illustrator CS2
  • From: "stephan peterson" <email@hidden>
  • Date: Tue, 30 Jan 2007 14:04:36 -0600 (CST)
  • Importance: Normal

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:
> 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:
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>)

  • Prev by Date: RE: SQLite Version Problems
  • Next by Date: Problem reading UTF8 source email from OS X Mail application
  • Previous by thread: Get Resolution of Embeded Image(s) in Illustrator CS2
  • Next by thread: SQLite Version Problems
  • Index(es):
    • Date
    • Thread