Skip to main content
suez22
Participant
December 16, 2018
Question

Export to TIFF - Embedding ICC Profile

  • December 16, 2018
  • 1 reply
  • 1018 views

Hi,

I guess that this has a solution, but it looks like there is no exportOption for TIFF files, however it is available in the dialog box when Exporting TIFFs.

In general my script looks like this:

  var exportOptions = new ExportOptionsTIFF();

  var type = ExportType.TIFF;

  var fileSpec = new File(outputDir);

  var fileFolder = new Folder(outputDir + '/' + format.toUpperCase());

  if(!fileFolder.exists) fileFolder.create();

  //exportOptions.antiAliasing = true;

  exportOptions.byteOrder = TIFFByteOrder.IBMPC;

  exportOptions.imageColorSpace = ImageColorSpace.CMYK;

  exportOptions.IZWCompression = true;

  exportOptions.embedICCProfile = true; // THIS DOES NOT MAKE AN ERROR IN THE COMPILER BUT DOES NOT WORK

  // Export to 300DPI

  exportOptions.resolution = 300;

  var resFolder = new Folder(fileFolder + '/' + exportOptions.resolution + 'DPI');

  if(!resFolder.exists) resFolder.create();

  fileSpec = new File(resFolder);

  app.activeDocument.exportFile(fileSpec, type, exportOptions );

  // Export to 72DPI

  exportOptions.resolution = 72;

  var resFolder = new Folder(fileFolder + '/' + exportOptions.resolution + 'DPI');

  if(!resFolder.exists) resFolder.create();

  fileSpec = new File(resFolder);

  app.activeDocument.exportFile(fileSpec, type, exportOptions );

My question is how to export via JSX including the working ICC Profile. Is it a question that a profile has to be saved in the AI file, otherwise the export does not see it?

This topic has been closed for replies.

1 reply

suez22
suez22Author
Participant
December 16, 2018

My only solution as of now is to create Actions and run those actions from the via JavaScript, but this is not flexible. Any better soltutions? Thanks in advance

Silly-V
Legend
December 16, 2018

Have you looked at our dynamic script-action-control method? It is the way to make actions flexible and may be the answer you need.

Creating a dynamic action to use with app.doScript() method.