UXP Toolkit
    Preparing search index...

    Options for saving a document in JPEG format using the Document.saveAs method

    const doc = app.activeDocument;
    const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.jpg");
    await doc.saveAs.jpg(saveFile, {
    quality: 10,
    embedColorProfile: true
    });

    objects/saveoptions

    22.5

    interface JPEGSaveOptions {
        color?: SolidColor;
        customMatte?: SolidColor;
        embedColorProfile?: boolean;
        formatOptions?: JPEGFormatOptions;
        matteColor?: MatteColor;
        quality?: number;
        scans?: number;
    }
    Index

    Properties

    color?: SolidColor

    A custom color to use to fill anti-aliased edges adjacent to transparent areas of the image. Mutually exclusive with 'matteColor'.

    22.5

    customMatte?: SolidColor

    Custom matting color; overrides matteColor

    22.5

    embedColorProfile?: boolean

    False to skip embedding the color profile in the document

    22.5

    formatOptions?: JPEGFormatOptions

    The JPEG format option to use.

    STANDARDBASELINE
    

    22.5

    matteColor?: MatteColor

    The color to use to fill anti-aliased edges adjacent to transparent areas of the image. Mutually exclusive with 'color'.

    22.5

    quality?: number

    The image quality setting to use; affects file size and compression.

    8
    

    0...12

    22.5

    scans?: number

    The number of scans to incrementally display the image on the page. formatOptions must be JPEGFormatOptions.PROGRESSIVE.

    3
    

    3...5

    22.5