Copy link to clipboard
Copied
Hi,
I am creating a script that needs to be able to find the DPI of a linked image. I presume there must be some way of getting to this data as it is in the links window in illustrator.
I do also need to get other information in that window (colour space & scale), but the DPI is the one im struggling with at the moment.
Mac 10.9, illustrator CS6, extendscript
Has anyone got any ideas?
Thanks in advance,
Tom
there are two options here, one via Object Matrix, the other via opening the image in Photoshop
Copy link to clipboard
Copied
you could try this workaround...
Copy link to clipboard
Copied
Hi imagecollection,
Thanks for the reply.
I have tried the trace method already, it does not seem to work on linked images, plus it is not something i want to use if i can get away with it as it would be very memory intensive with the amount of images im trying to get the data from.
I was more wondering if there is something that Adobe have not documented or if it would be possible to get the information from the files themselves outside of illustrator.
Copy link to clipboard
Copied
Very possible from outside illustrator. but I would not know where to start as you are on a mac.
i Would have resorted to an AHK script or some such. But that is not on mac. Not sure where to point you for that. Maybe there is a macster out there with a solution?
Copy link to clipboard
Copied
there are two options here, one via Object Matrix, the other via opening the image in Photoshop
Copy link to clipboard
Copied
Do you know if it would be possible through the documents XMP data or the image XMP?
Copy link to clipboard
Copied
Document XMP? have a look at it, if the info is there, then it may be possible to retrieve it.
Image XMP? same as above, except you need a reference to the image file itself.
Give those two options a try and we go from there.
Copy link to clipboard
Copied
Thanks for the assistance, both of you.
After looking at the XMP i have discovered that only Tiff files have the relevent data that i need and as there will be multiple file formats that the script will need to read this is not an option.
I have used the bridge talk script from the other post that you linked and adapted it to search through all files in the document and quit photoshop when finished.
One last question, is there anyway to find out if photoshop is already running? i dont want it to close the application if the user already had it open before running.
Copy link to clipboard
Copied
if (BridgeTalk.getStatus('photoshop') == 'ISNOTRUNNING') alert ('safe to close when done');
Copy link to clipboard
Copied
Fantastic! thanks carlos.
Copy link to clipboard
Copied
read the link carlos posted.
2 solutions that beat the rear meat off doing a trace