Skip to content
FutureBlitz

    Install

    Import std.image.bitmap

    Tga

    std.image.bitmap

    struct

    Public Struct Tga

    What reads and writes TGA images, in its Static Methods.

    Examples

    
    Local image = Image(2, 2)
    image.Fill(Color32.Yellow)
    Local back = Try Tga.Decode(Tga.Encode(image))
    Expect(back[1, 1] == Color32.Yellow)

    std/image/bitmap.fb, line 61

    • @PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOError static method #

      The image in data, a TGA of a palette, gray, or colors, run-length encoded or not. Throws an IOError of INVALID_DATA when the data isn't a TGA or is broken, and OTHER when the image has more pixels than limit. Panics when the limit is negative.

    • @PanicsAtCaller Public Static Method Encode(image: Image): UInt8[] static method #

      The TGA of the image, 32 bits a pixel, with its alpha, run-length encoded. Panics when it has no pixels or a side longer than 65535.

    Report an issue with this page or with FutureBlitz on GitHub.