Import std.image.bitmap
Tga
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)-
@PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOErrorstatic 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 thedataisn't a TGA or is broken, and OTHER when the image has more pixels thanlimit. Panics when thelimitis negative. -
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.