I need to get the resolution of linked images in Quark6.5, but the code below returns nulls. If, in a Quark doc, you check the Usage box and click on “More information”, it shows the image resolution and its width, heigth and DPI in the last line called “Dimension:”. Anyone know how to get the info so I can divide it by the scale factor to get final resolution of the images?
tell application "QuarkXPress"
tell document 1
repeat with thePic from 1 to (count of picture boxes)
tell picture box thePic
get name of image 1 -- returns null, see result below
get file path of image 1
get scale of image 1
--get dimensions of image 1 -- does not work even though Quark usage box in the "More information" area labels the Height, Width and resolution as "Dimension"
get actual bounds of image 1
get bounds of image 1
try
get color TIFF resolution of image 1-- returns null, see result below
get gray TIFF resolution of image 1-- returns null, see result below
get resolution of image 1 -- does not work
end try
end tell
end repeat
end tell
end tell
RESULT:
tell application “QuarkXPress”
count every picture box of document 1
297
get name of image 1 of picture box 1 of document 1
“” ---- MISSING DATA
get file path of image 1 of picture box 1 of document 1
alias “JobVol:Fileserver:ACTIVE JOBS BABY:42015 Tristar NL:ART:Corey Luck.tif”
get scale of image 1 of picture box 1 of document 1
{“250%”, “250%”}
get actual bounds of image 1 of picture box 1 of document 1
{“-0.3"”, “-0.012"”, “2.825"”, “2.442"”}
get bounds of image 1 of picture box 1 of document 1
{0, 0, 70, 81}
get color TIFF resolution of image 1 of picture box 1 of document 1
get name of image 1 of picture box 2 of document 1
“”
get file path of image 1 of picture box 2 of document 1
null
get scale of image 1 of picture box 2 of document 1
{“100%”, “100%”}
get actual bounds of image 1 of picture box 2 of document 1
{“0"”, “0"”, “0"”, “0"”}
get bounds of image 1 of picture box 2 of document 1
{0, 0, 0, 0}
get color TIFF resolution of image 1 of picture box 2 of document 1
MISSING DATA
get name of image 1 of picture box 3 of document 1
“”
get file path of image 1 of picture box 3 of document 1
alias “JobVol:Fileserver:ACTIVE JOBS BABY:42015 Tristar NL:ART:doc david Womac.tif”
get scale of image 1 of picture box 3 of document 1
{“70%”, “70%”}
get actual bounds of image 1 of picture box 3 of document 1
{“0"”, “-0.137"”, “2.772"”, “1.937"”}
get bounds of image 1 of picture box 3 of document 1
{0, 0, 199, 285}
get color TIFF resolution of image 1 of picture box 3 of document 1
MISSING DATA