1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 20:10:05 +00:00

Updated TGA I O Functions (markdown)

Chuck Walbourn 2015-06-21 20:49:04 -07:00
parent 6186abafa7
commit 8c9fe898fc

@ -21,6 +21,10 @@ Loads a ``.TGA`` file.
#SaveToTGAMemory, SaveToTGAFile
Saves an image to a ``.TGA`` file.
HRESULT SaveToTGAMemory( const Image& image, Blob& blob );
HRESULT SaveToTGAFile( const Image& image, LPCWSTR szFile );
* ``R8G8B8A8_UNORM``, ``R8G8B8A8_UNORM_SRGB``, ``B8G8R8A8_UNORM``, and ``B8G8R8A8_UNORM_SRGB`` data are written as a 32-bit truecolor uncompressed ``.TGA`` file
* ``B8G8R8X8_UNORM`` and ``B8G8R8X8_UNORM_SRGB`` data is written as a 24-bit truecolor uncompressed ``.TGA`` file
@ -29,10 +33,6 @@ Saves an image to a ``.TGA`` file.
* ``R8_UNORM`` and ``A8_UNORM`` data is written as an 8-bit uncompressed greyscale ``.TGA`` file
HRESULT SaveToTGAMemory( const Image& image, Blob& blob );
HRESULT SaveToTGAFile( const Image& image, LPCWSTR szFile );
# Parameters
For the load functions, the _metadata_ parameter can be nullptr as this information is also available in the returned **ScratchImage**.
@ -71,7 +71,7 @@ You can also save data directly from memory without using the intermediate **Scr
* The reader does not support interleaved files (this feature was deprecated)
* The reader only supports 8-bit greyscale, 16-bit truecolor, 24-bit truecolor, and 32-bit truecolor images
* The writer always creates uncompressed files, although the reader can load RLE compressed files
* The reader and writer do not support the TGA header extension metadata, which is ignored by the reader.
* The reader and writer do not support the ``TGA`` header extension metadata, which is ignored by the reader.
* For 16-bit and 32-bit truecolor images, there is a special-case fixup if the entire alpha channel is 0 it is assumed to be fully opaque.
# Windows Store apps