JPEGSaveOptions formatOptions constant not working

Adobe Community Professional ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

Anyone having problems with the FormatOptionsType.STANDARDBASELINE constant when setting JPEGSaveOptions?

 

This thows an error:

var fp = Folder.desktop + "/test.jpeg"
var doc = app.activeDocument

var so = new JPEGSaveOptions();
so.formatOptions = FormatOptionsType.STANDARDBASELINE;
so.quality = 10;

doc.saveAs(new File(fp), so, true);

 

This works:

var fp = Folder.desktop + "/test.jpeg"
var doc = app.activeDocument

var so = new JPEGSaveOptions();
//so.formatOptions = FormatOptionsType.STANDARDBASELINE;
so.quality = 10;

doc.saveAs(new File(fp), so, true);

 

The integer values don’t work either:

https://www.indesignjs.de/extendscriptAPI/photoshop-latest/#FormatOptionsType.html#d1e28819

TOPICS
SDK

Views

32

Likes

translate

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 Community Professional ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

It’s 

so.formatOptions = FormatOptions.STANDARDBASELINE;

Likes

translate

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