Home > @gglib/content-loaders > TGA

TGA class

Signature:

export declare class TGA 

Constructors

Constructor Modifiers Description
(constructor)(data) Interprets the given array buffer as TGA formatted image

Properties

Property Modifiers Type Description
colorMap Uint8Array | null Color lookup table
colorMapStride number Bytes per pixel in the color map
header TGAHeader Parsed TGA header
height number Height of the texture
imageData Uint8Array Pixel data
isGray boolean Specifies whether this is a grayscale image
width number Width of the texture

Methods

Method Modifiers Description
decode_cm8(format) Decodes color mapped into i5551 format
decode_cm8(format) Decodes color mapped into given format
decode_gray16(format) Decodes 16bit grayscale into given format
decode_gray16(format) Decodes 16bit grayscale into given format
decode_gray16(format) Decodes 16bit grayscale into given format
decode_gray8(format) Decodes 8bit grayscale into given format
decode_rgb24(format) Decodes 24bit rgb into given format
decode_rgba16(format) Decodes 16bit rgba into given format
decode_rgba16(format)
decode_rgba32(format) Decodes 32bit rgba into given format
getImageData() Reads TGA data and converts to RGBA ImageData (8bit per channel)
getTextureOptions()
parse(data) static