@kayahr/wastelib
    Preparing search index...

    Class Title

    Container for the title image.

    Hierarchy (View Summary)

    Index

    Properties

    data: Uint8Array

    The image data.

    height: number

    The image height in pixels.

    width: number

    The image width in pixels.

    Methods

    • Draws the image onto the given rendering context.

      Parameters

      • ctx: CanvasRenderingContext2D

        The rendering context to draw the image to.

      • x: number = 0

        Optional horizontal target position. Defaults to 0.

      • y: number = 0

        Optional vertical target position. Defaults to 0.

      Returns void

    • Returns the RGBA color at the specified position.

      Parameters

      • x: number

        The horizontal pixel position.

      • y: number

        The vertical pixel position.

      Returns number

      The RGBA color at the specified position.

    • Returns a copy of the image data. Each byte contains two 4-bit colors.

      Returns Uint8Array

      The image data.

    • Creates and returns a new canvas containing the image.

      Returns HTMLCanvasElement

      The created canvas.

    • Creates and returns an image data URL.

      Parameters

      • Optionaltype: string

        Optional image mime type. Defaults to image/png.

      • Optionalquality: number

        Optional quality parameter for encoder. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.

      Returns string

      The created data URL.

    • Creates and returns a HTML image.

      Parameters

      • Optionaltype: string

        Optional image mime type. Defaults to image/png.

      • Optionalquality: number

        Optional quality parameter for encoder. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.

      Returns HTMLImageElement

      The created HTML image.

    • Parses a title image from the given array and returns it.

      Parameters

      • array: Uint8Array

        The vxor encoded array.

      Returns Title

      The parsed title.pic image.

    • Reads the title image from the given blob and returns it.

      Parameters

      • blob: Blob

        The TITLE.PIC blob to read.

      Returns Promise<Title>

      The read title image.