Click or drag to resize
Pdftools logo

PngImageOptionsBitsPerPixel Property

The number of bits per pixel for indexed output

Get or set the index width used for indexed (palette) output. The value determines the maximum number of palette colors (2 to the power of the bits per pixel), and hence the file size. Valid values are 1, 2, 4 and 8.

This property only applies when Indexed is selected as the ColorSpace; it is ignored for Rgb and Gray.

Default: 8


Namespace: PdfTools.Pdf2Image
Assembly: PdfTools (in PdfTools.dll) Version: 1.21.0+681095c836a504fad5babf64a745b2efeb5bae2c
Syntax
C#
public int BitsPerPixel { get; set; }

Property Value

Int32
Exceptions
ExceptionCondition
ArgumentException[set] The given value is not one of 1, 2, 4 or 8.
See Also