• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I lookup the Tiff Image Compression being used on my file?

Enthusiast ,
Dec 29, 2014 Dec 29, 2014

Copy link to clipboard

Copied

I'm trying to figure out where this is stored in the file structure, I've tried a few different options, but I'm stuck. I dumped all the attributes of the file to console, but it's not there.

Latest I tried this:

app.activeDocument.TiffSaveOptions)

I could simply open up each file and do a Save As Which would show me all the settings, but it's more time consuming than writing this to text.

Also, does anyone have a recommendation for an Object Model Viewer? Is there one? I'd like to learn more about the files and structures themselves, without having to do hours of experimentation, since it can be difficult to figure out where things are nested.

TOPICS
Actions and scripting

Views

248

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advisor ,
Jan 02, 2015 Jan 02, 2015

Copy link to clipboard

Copied

var compression = -1; // unknown
var rex = /\<tiff:Compression\>(.+)\<\/tiff:Compression\>/;
if (app.documents.length > 0) {
  var xmp = String(app.activeDocument.xmpMetadata.rawData);
  var m = xmp.match(rex);
  if (m) {
    compression = Number(m[1]);
  }
}

alert(compression);

Also, does anyone have a recommendation for an Object Model Viewer?

There is an OMV for JavaScript that comes built in to ESTK.

There is one PDF for the PS DOM and another for called the JavaScript Tools Guide.

I'd like to learn more about the files and structures themselves, without having to do hours of experimentation, since it can be difficult to figure out where things are nested.

There is a Photoshop Files Format PDF, also available on Adobe.com. I've used variants of it since the version that came out for PS6 many years ago.

But that stuff is not for the faint of heart.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 02, 2015 Jan 02, 2015

Copy link to clipboard

Copied

LATEST

Thanks again xbytor2! I use that OMV frequently, and had searched the JavaScript Tools Guide. I'll look for the other PDF though sounds great!

What I was wondering is if there were a viewer that showed the data in the file, yeah there would be a lot of random jargon, but it would be searchable at least to find a breadcrumb, similar to how you can open an Illustrator file in developer mode, when the file becomes corrupt, so you may extract the offending code.

The main issue I face, as is with all scripting languages I don't know exactly where things are stored, and although i created a dump function that loops through an object, it's still a guessing game. The OMV, and PDFs are always great but sometimes drop you 30 miles from your answer. Granted, I may need to read the "how to use" text at the beginning to fully understand. Problem being, I love coding, but hate reading.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines