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

    Class BilevelBitmap

    Represents a bi-level transparency mask or an image containing two colors: black and white in either a white-is-zero or black-is-zero format.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get height(): number

      Gets the height of the BilevelBitmap, in pixels.

      Returns number

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get lowerBitsFirst(): boolean

      Gets or sets a value specifying whether pixels with lower column indices are stored in the lower-order bits of the byte.

      Returns boolean

    • set lowerBitsFirst(value: boolean): void

      Gets or sets a value specifying whether pixels with lower column indices are stored in the lower-order bits of the byte.

      Parameters

      • value: boolean

      Returns void

    • get transparencyMask(): boolean

      Gets or sets a value indicating whether the image is used to define an alpha mask of another image.

      Returns boolean

    • set transparencyMask(value: boolean): void

      Gets or sets a value indicating whether the image is used to define an alpha mask of another image.

      Parameters

      • value: boolean

      Returns void

    • get whiteIsZero(): boolean

      Gets or sets a value indicating whether 0 represents white and 1 represents black (if true) or vice versa (if false).

      Returns boolean

    • set whiteIsZero(value: boolean): void

      Gets or sets a value indicating whether 0 represents white and 1 represents black (if true) or vice versa (if false).

      Parameters

      • value: boolean

      Returns void

    • get width(): number

      Gets the width of the BilevelBitmap, in pixels.

      Returns number

    Methods

    • Clears the BilevelBitmap with the specified value (true is 1, false is 0).

      Parameters

      • value: boolean

        The value to fill the image (true is 1, false is 0).

      • Optionalbounds: Bounds | null

        The target rectangle of the BilevelBitmap.

      Returns void

    • Creates a new BilevelBitmap with a copy of the image.

      Parameters

      • OptionalmetadataOnly: boolean = false

        specifies whether to copy the image metadata only, not actual pixel data.

      Returns BilevelBitmap

      A new instance of the BilevelBitmap.

    • Detaches the object from the ObjectManager and deallocates its memory, if possible.

      Returns void

    • Inverts all black pixels to white and all white pixels to black.

      Returns void