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

    Class Image

    Represents a JPEG or PNG image instance.

    Hierarchy (View Summary)

    Index

    Accessors

    • get height(): number

      Gets the height of the image, in pixels.

      Returns number

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get opaque(): boolean

      Gets the value indicating if the image is opaque.

      Returns boolean

    • get width(): number

      Gets the width of the image, in pixels.

      Returns number

    Methods

    • Creates an Image from the byte array with JPEG or PNG encoded image data.

      Parameters

      • imageBytes: Uint8Array

        The binary data of the image.

      Returns Image

      A new instance of the Image.

    • Creates an Image from the byte array with JPEG or PNG encoded image data.

      Parameters

      • om: ObjectManager

        An object manager that controls the lifetime of the Image object.

      • imageBytes: Uint8Array

        The binary data of the image.

      Returns Image

      A new instance of the Image.

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

      Returns void

    • Saves the Image as a byte array with PNG or JPEG-encoded image data.

      Returns Uint8Array

      A byte array with image data.