Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ImageChunk

Index

Constructors

  • new ImageChunk(width?: number, height?: number, locations?: ImageLocation[], data?: Uint8Array, base?: number): ImageChunk
  • Parameters

    • width: number = 128

      Width in PSMCT32 format. Width is doubled in PSMT8 and PSMT4, and halved in CLUTs.

    • height: number = 128

      Height in PSMCT32 format. Height is doubled in PSMT8 and in CLUTS, and quadrupled in PSMT4.

    • locations: ImageLocation[] = []

      A list of locations within the image file

    • data: Uint8Array = ...

      Image data in PSMCT32 format

    • base: number = 0

      The default base address within the GS memory to write the image data to. Usually 0, but is set to 0x2a00 in fullscreen images and in the frontend data icon file.

    Returns ImageChunk

Properties

base: number = 0
data: Uint8Array = ...
height: number = 128
locations: ImageLocation[] = []
width: number = 128

Methods

  • export_data(where: ImageLocation, swap_red_blue?: boolean, fixup_alpha?: boolean): Uint8Array
  • Parameters

    • where: ImageLocation
    • swap_red_blue: boolean = false

      Only relevant in PSMCT32 - swaps between RGB and BGR

    • fixup_alpha: boolean = false

      Only relevant in PSMCT32 - Remap alpha from 0x00-0x80 to 0x00-0xFF

    Returns Uint8Array

  • find_location(location_number: number): undefined | ImageLocation
  • import_data(where: ImageLocation, input: Uint8Array, swap_red_blue?: boolean, fixup_alpha?: boolean): void
  • Parameters

    • where: ImageLocation
    • input: Uint8Array
    • swap_red_blue: boolean = false

      Only relevant in PSMCT32 - swaps between RGB and BGR

    • fixup_alpha: boolean = false

      Only relevant in PSMCT32 - Remap alpha from 0x00-0xFF to 0x00-0x80

    Returns void

  • import_indexed_data(where: ImageLocation, input: Uint8Array, clut: ImageLocation, swap_red_blue?: boolean, fixup_alpha?: boolean, premultiply?: boolean): void
  • to_blob(): Blob

Generated using TypeDoc