5 ms·
Back in the (DOS) days, Targa/TGA was somewhat popular for the asset usage. Simple format plus RLE for a small size benefit.
by mhd 4y ago
Back in the (DOS) days, Targa/TGA was somewhat popular for the asset usage. Simple format plus RLE for a small size benefit.
- qayxc 4y agoAmazing how few people do some basic research - this isn't new or exciting at all. TGA is fine and has been around for decades. It also has the added benefit that many applications still support it natively. I really don't get the appeal of inventing yet another custom file format that has so few objective benefits.
- layer8 4y agoUnlike QOI, TGA only has RLE as a means of compression, and therefore has worse compression on many images than QOI. At the same time, TGA supports a much larger range of format variants (arbitrary color depths, color palettes, grayscale mode), making it much more complex to implement than QOI.
- qayxc 4y agoAnd what exactly stops a decoder from simply disregarding unnecessary format variants? If you go as far as to implement your own decoder anyway, this argument is simply not applicable. Supporting only a subset of the format is perfectly acceptable - see TIFF, for example; not every application supports every possible feature.
- layer8 4y agoYou still need extra code to check that the format variant matches your expectations. I guess you could go very bare-bones and just assume that it’s in the right format and only check for buffer overflows, at the cost that errors will be harder to diagnose when the format is wrong. And you’d still have the overhead of the larger metadata structures of TGA. The fact is, none of the existing formats is a perfect fit for the embedded use-case here. It makes sense to introduce a new, simple and straightforward format if it addresses certain typical use-cases better than existing formats do.
- mhd 4y agoIt's a cute format. Better than most RLE images, if I remember correctly, getting you a good way towards PNG. So might not be best for every situation, but why not have that in your toolkit? Especially if being able to understand all of your stack is important to you.