Copy link to clipboard
Copied
I have 2 JPEG image files open in PS; one was saved with a quality setting of 10, and the other saved with a quality setting of 12. When I switch between the 2, and do a Save As on each one, the JPEG Options dialog accurately reflects the quality setting of each one.
I would like to be able to query PS, from my application using an AppleScript, for this information. Is that possible, and if so, how?
The reason I want to do this is, my application opens a number of files in PS for editing; in this particular case, my client would like to always save the images as a JPEG quality 12, so as to reduce the risk or artifacting (which is more evident at, say, even the 10 quality setting). However, if the image has *already* been saved with a quality setting of 12, I'd like to not add yet another extraneous file save to the mix. Thus, if I can ask PS for the quality setting of the image, then I can decide whether to tell it to save it at the higher quality setting or not.
Copy link to clipboard
Copied
I would like to be able to query PS, from my application using an AppleScript, for this information. Is that possible, and if so, how?
There's a Photoshop specific EXIF field called PhotoshopQuality (in
exiftool-speak) that should give you what you need. I don't know if you
can get at it via XMP or not, however.
-X
Copy link to clipboard
Copied
Sadly, you appear to be correct. "tell application id "com.adobe.Photoshop" to get properties of XMP metadata of document 1" says nothing about "Photoshop Quality". Neither does getting information in the image file in PS itself. At least it's consistent(ly braindead).
Maybe I'll just bundle exiftool in my app.
Copy link to clipboard
Copied
Sorry it's not applescript but there is a javaScript here that might help?