Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Image

Hierarchy

  • Image

Index

Constructors

constructor

Methods

copy

  • copy(src: Image, destX: number, destY: number, sourceRect?: IntRect, applyAlpha?: boolean): void
  • Parameters

    • src: Image
    • destX: number
    • destY: number
    • Optional sourceRect: IntRect
    • Optional applyAlpha: boolean

    Returns void

create

  • create(width: number, height: number, colorOrPixels: number | Color | Buffer | number[] | ArrayBuffer | Uint8Array): void
  • Parameters

    • width: number
    • height: number
    • colorOrPixels: number | Color | Buffer | number[] | ArrayBuffer | Uint8Array

    Returns void

createMaskColor

  • createMaskColor(color: number | Color, alpha?: number): void

duplicatePixels

  • duplicatePixels(): Buffer

flipHorizontally

  • flipHorizontally(): void

flipVertically

  • flipVertically(): void

getPixel

  • getPixel(x: number, y: number): Color

getSize

loadFromFile

  • loadFromFile(filename: string): Promise<boolean>

loadFromFileSync

  • loadFromFileSync(filename: string): boolean

loadFromMemory

  • loadFromMemory(buff: Buffer): boolean

saveToFile

  • saveToFile(filename: string): Promise<void>

setPixel

  • setPixel(x: number, y: number, color: number | Color): void

Generated using TypeDoc