Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
/ tga.zig Public archive

Demonstration of writing a TGA file from Zig.

License

Notifications You must be signed in to change notification settings

ratfactor/tga.zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write a TGA file with Zig

MOVED! Hello, I am moving my repos to http://ratfactor.com/repos/ and setting them to read-only ("archived") on GitHub. Thank you, -Dave

This program demonstrates writing TGA "targa" image files by writing a pretty gradient.

pretty gradient made by this program

TGA is easy to write and has wonderfully software support, but there are a couple "gotchas" in the header and image data, namely:

  • An image "origin" is specified in two places in the header - get it wrong and you’ll be scratching your head at the mess on the screen.

  • Pixels are in Blue Green Red order, not RGB.

About

Demonstration of writing a TGA file from Zig.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages