UXP Toolkit
    Preparing search index...

    Options describing the operation.

    objects/options

    24.4

    interface GetPixelsOptions {
        applyAlpha?: boolean;
        colorProfile?: string;
        colorSpace?: string;
        componentSize?: ComponentSize;
        documentID?: number;
        layerID?: number;
        sourceBounds?: ImagingBounds2;
        targetSize?: Size;
    }
    Index

    Properties

    applyAlpha?: boolean

    If true, then RGBA pixels will be converted to RGB by matting on white. The returned imageData property will not contain an alpha channel. Note that any areas devoid of pixel data will still be trimmed, see sourceBounds above.

    24.4

    colorProfile?: string

    The name of a color profile to apply to the returned pixels. If omitted, then the resulting color profile depends on the requested color space:

    • If the requested color space matches the source document, then the returned data will use the color profile of the source document.
    • If the requested color space is different from the source document, then the working color profile for that color space is used to convert colors.

    24.4

    colorSpace?: string

    Requested color space of the returned pixels. If omitted, then the color space of the source document is used to convert colors.

    24.4

    componentSize?: ComponentSize

    The requested componentSize of the returned image data. If this property is omitted then the componentSize of the source pixel data is used. The value can be: -1 (for using the source document's depth), 8, 16, or 32.

    24.4

    documentID?: number

    The id of the source document. If missing, or negative, then the source is the active document.

    24.4

    layerID?: number

    The id of the source layer. If the value is not provided then the API returns pixels from the composite document image.

    24.4

    sourceBounds?: ImagingBounds2

    The region whose pixels should be returned. If the value is not provided, then pixels from the entire layer or document are is returned. The provided bounds will be trimmed to only that region that contains pixel data. In this event, the returned sourceBounds will reflect this smaller region.

    24.4

    targetSize?: Size

    The dimensions of the returned image. If this value is not provided then the returned size will match the requested size. That is, no scaling will be performed on the returned pixels.

    24.4