Skip to main content
MarkWalsh
Inspiring
February 20, 2013
Question

Determine resolution when opening file

  • February 20, 2013
  • 1 reply
  • 1785 views

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.

This topic has been closed for replies.

1 reply

Inspiring
February 21, 2013

I just finished a project where I was trying to do something similar. What I did was read the file for the 'box' info and used that to open the file with. That works with .ai and .pdf so I would think it would work with .eps.

It's javascript and I will be glad to post the required functions if you want to try that approach.

MarkWalsh
MarkWalshAuthor
Inspiring
February 21, 2013

That would be great. I also process ai and pdf files with this application as well, so even if it doesn't help with my current issue, it may be useful in other areas. Thanks

Inspiring
February 21, 2013

Mark, what created these files… In general *.ai, *.eps & *.pdf have no resolution as such… They can all contain vector, raster or both plus a bunch of other stuff… You should be able test the file creator and if its PS the just open else open with options…