• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
JPEG compression factor via AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JPEG compression factor via AS


  • Subject: JPEG compression factor via AS
  • From: Roger Howard <email@hidden>
  • Date: Thu, 3 Jun 2004 10:55:55 -0700

Anyone have a workable idea for getting the compression factor from a JPEG via AppleScript?

I thought ImageMagick or jhead might deliver this via a do shell script call, but neither does. I'm hoping to avoid digging into the quant tables in the files directly.

Photoshop itself seems to know this data, but has no direct way of getting at it. For instance, when you open a JPEG and then do a Save As and bring up the JPEG options dialog, it's pre-entered the previous quant factor (on Photoshops 1-12 scale, which is accurate enough for my needs). This text field, though, doesn't seem to be accessible via GUI Scripting - and this is an area of AppleScript on OSX I haven't used before, so I could just be missing it. Have tried several of the GUI element inspectors and I don't see this text field called out in a way I can get to.

The other option may be to bring up this JPEG options dialog and just do a blind "copy" since the value in the Quality field is pre-selected... but haven't gotten that working.

Ideally, I could get a rough quant factor directly with a shell tool of some kind - but the usual suspects I know of don't report this info in any meaningful way.

PS, not looking for a simple ratio of the compressed size vs the original/uncompressed size... that'd be too easy :)

Thanks for any help,

Roger
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: JPEG compression factor via AS
      • From: Roger Howard <email@hidden>
  • Prev by Date: Re: Filling a cell in Excel
  • Next by Date: Delete an Item from a list
  • Previous by thread: Re: launch only in background
  • Next by thread: Re: JPEG compression factor via AS
  • Index(es):
    • Date
    • Thread