[]
DsPdfJS API / ImageOptions
ImageOptions =
object
Represents options controlling how native images are processed when inserted in a PDF file.
optionalalphaThreshold: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.
optionalcompressColors: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.
optionalformat:PdfImageFormat
optionaljpegQuality: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.