Skip to main content
Participant
September 10, 2008
Question

Read (get) active document jpeg save quality

  • September 10, 2008
  • 3 replies
  • 805 views
When one creates a jpeg using Save As, the jpeg options dialog box allows one to select a quality level of 1 to 12. When the file is re-opened and saved again using Save As, the original quality value appears in the dialog box. Is there a way to use javascript (or vb or applescript) to read this value for the active document?

According to the Javascript Scripting Guide, the JPEGSaveOptions for quality are read and write.

If one uses:
alert(JPEGSaveOptions.quality), one gets the value 3, which is the default value.

How do I get the value for the current active jpeg image (document)? Is it possible?

TIA,

Tom
This topic has been closed for replies.

3 replies

Participant
September 10, 2008
Thanks for the replies Mike and X,

I opened a Photoshop-saved jpeg in a text editor and parsed the "English" sections of the data but could not find any legible metadata tags for jpeg save quality. So I guessing it's in the mumbo-jumbo characters (binary areas) of the image file.

I would rather not use Exiftool, but it may be the only way to access this PS specific parameter.

Tom
Inspiring
September 10, 2008
Here is a link that has code that finds the PhotoshopQuality using Exiftool http://ps-scripts.com/bb/viewtopic.php?t=1339

Mike
Known Participant
September 10, 2008
Tom_Hallstein@adobeforums.com wrote:
>
> How do I get the value for the current active jpeg image (document)? Is it possible?

It's actually an Ps-specific exif value. I determined how to get at it other
than by using exiftool. Ex:
exiftool -PhotoshopQuality DSCN3255.jpg

I'll crack open exiftool and see if there's a straightforward way to read it
directly from the file.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com