Determine resolution when opening file
I have a program which processes images through Applescript, and I am having a problem with certain EPS files, notably if a file is saved with 'Vector Information', the file opens at 72 DPI (I have the files opening without dialogs). I would like to specify the resolution only when I open these files (@300DPI, or preferrably, whatever resolution the original file was if that can be determined before opening), but I want all other files to open at their native resolution. If I specify the open options, it will open all files at that resolution.
Is there a way for my program to determine the native file resolution before opening, and/or to also identify which files will need to have the resolution specified (i.e. the ones with vector info)?
I am currently using Applescript, but a Javascript solution would also be acceptable.