The TGA image specification contains these two fields:
Field 5.1 (2 bytes) - X-origin of Image:
These bytes specify the absolute horizontal coordinate for the lower
left corner of the image as it is positioned on a display device having
an origin at the lower left of the screen (e.g., the TARGA series).
Field 5.2 (2 bytes) - Y-origin of Image:
These bytes specify the absolute vertical coordinate for the lower
left corner of the image as it is positioned on a display device having
an origin at the lower left of the screen (e.g., the TARGA series).
This seems strange to me. Why is the position of an image on the screen contained in the data for the image itself? I would expect that images don't care about where they are positioned, since that's the responsibility of the rendering engine. Could it have to do with the fact that TGA images were designed for special video cards?
Here's a link to the TGA spec for reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf
What is a TGA File? TGA refers to a raster graphics file format created by Truevision Inc. This format had been used as the native format for TARGA and VISTA graphic cards for IBM PC's to support Truecolor display. TGA files are common in animation and video industry.
The Targa (TGA) format was developed by Truevision for their video boards. The format supports 32-bit true color; that is, 24-bit color plus an alpha channel, and is typically used as a true color format. Targa files are widely used to render still images and to render sequences of still images to video tape.
A TGA file is an image saved in the Targa raster graphic format designed by Truevision. It supports 8, 16, 24, or 32 bits per pixel at a maximum of 24 bits for RGB colors and an 8-bit alpha channel. TGA files are used for various types of images, such as digital photos and textures referenced by 3D video games.
After some conversation, we've deduced that these fields were used to decompose large images into many smaller images. For example, the 3Dfx video cards were most efficient at drawing full-screen images if you split the image into 256x256 blocks. The offset of those blocks on the screen could be represented using this field, which would allow the renderer to reconstruct the original image.
See this Twitter thread: https://twitter.com/Donzanoid/status/496248178799550464
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With