DsPdfJS API - v9.1.0
    Preparing search index...

    Type Alias ImageOptions

    Represents options controlling how native images are processed when inserted in a PDF file.

    type ImageOptions = {
        alphaThreshold?: number;
        compressColors?: boolean;
        format?: PdfImageFormat;
        jpegQuality?: number;
    }
    Index

    Properties

    alphaThreshold?: number

    Gets or sets the alpha threshold value. If all pixels of an image with the alpha channel have alpha values greater than or equal to this value, the alpha channel will not be saved, thus making the image and the whole PDF smaller. The default is 0xFF (i.e. all transparency is preserved). Not specified means 0xFF.

    compressColors?: boolean

    Gets or sets a value indicating whether to apply a slight compression to color values. Unlike JPEG, this preserves transparency while still reducing the image size. The default is false.

    Gets or sets the format to use when saving images. Not specified means "Auto".
    jpegQuality?: number

    Gets or sets the JPEG image quality, in percent. This value must be between 0 (lowest quality, maximum compression) to 100 (highest quality, no compression). Not specified means 75.