How to extract Resolution and Color Mode of an image on Quark document

I learnt from the forum that we can use properties of image file to obtain info for the image.
But i cannot find the info of Resolution, and also the Color Mode such as RGB or CMYK in it. Is it possible to obtain such information in Quark?
Can anyone please advise! Thanks in advance.

Hi there,

Have you tried ‘Image Events’ ?
I think I read a post similar to your query.
Here’s a start:-

http://bbs.macscripter.net/viewtopic.php?id=24736

HTH

Nick

Model: Poewr PC G5
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Thanks for your reply, TecNik!
I will make an effort to read thru the thread; but because I’m a newbie in AS, I afraid I may not be able to understand.

Not sure if this is on the right lines…
It needs some refinement.

Try selecting a pic box with an image in it and run the script:-

tell application "QuarkXPress"
	tell document 1
		tell page 1
			try
				set boxList to object reference of every picture box whose selected is true
			on error
				repeat
					display dialog "You've probably not selected any pic boxes!" buttons "Cancel" default button "Cancel" with icon caution
					exit repeat
				end repeat
			end try
			
			repeat with thisBox in boxList
				
				set pathToImage to (file path of image 1 of thisBox)
				
				tell application "Image Events"
					launch
					set theImageReference to open pathToImage
					tell theImageReference
						set {res1, res2} to resolution
						set colSpace to color space
					end tell
				end tell
				
				display dialog "Resolution: " & res1 & "  " & res2 & return & "Colorspace: " & colSpace & return as text
				
			end repeat
		end tell
	end tell
	
end tell

For this script to work the images need to be present.
I think I’ve tried something before where I’ve tried to retrieve the image info from ‘Picture Usage’ dialog in Quark but it’s something I couldn’t get at hence the use of ‘Image Events’.

Regards,

Nick

Model: Poewr PC G5
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Thanks for your kind helping hand, TecNik!
It works great. And I can save a lot of time to start fine-tuning from your script.

Hi Cits,

Glad it worked for you :slight_smile:

Regards,

Nick

When I run the script it stops at your error trap.

When I replace the error trap with

set boxList to object reference of every picture box

I get a resolution of 150 and color space of RGB when it is 300 CMYK file.

??

I use Quark 7, I changed the first line to

tell application "QuarkXPress Passport"