From 7bde911e08c89bddcb2812dc0f362473cdcc1250 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 30 Sep 2020 13:55:46 -0700 Subject: [PATCH] Updated TGA I O Functions (markdown) --- TGA-I-O-Functions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TGA-I-O-Functions.md b/TGA-I-O-Functions.md index 4110f86..b5d7202 100644 --- a/TGA-I-O-Functions.md +++ b/TGA-I-O-Functions.md @@ -103,15 +103,15 @@ if ( FAILED(hr) ) ## Color space -* ``TGA_FLAGS_IGNORE_SRGB`` When reading TGA files with TGA 2.0 metadata, if gamma is set to 2.2 or 2.4 the format is returned as ``_SRGB``. Using this flag disable this behavior. +* ``TGA_FLAGS_IGNORE_SRGB`` When reading TGA files with TGA 2.0 metadata, if gamma is set to 2.2 or 2.4 the format is returned as ``_SRGB``. Using this flag disables this behavior. -* ``TGA_FLAGS_DEFAULT_SRGB`` When reading TGA files with TGA 2.0 metadata, if gamma is not set then the format is returned as 'linear'. Using this flag will assume no gamma metadata indicates a sRGB colorspace instead. *This flag is ignored if you use ``TGA_FLAGS_IGNORE_SRGB``*. +* ``TGA_FLAGS_DEFAULT_SRGB`` When reading TGA files with TGA 2.0 metadata, if gamma is not set then the format is returned as 'linear'. Using this flag will assume no gamma metadata indicates a sRGB colorspace instead and will try to return a ``DXGI_FORMAT_*_SRGB`` format if available. *This flag is ignored if you use ``TGA_FLAGS_IGNORE_SRGB``*. * ``TGA_FLAGS_FORCE_SRGB`` When writing a file, the ``DXGI_FORMAT_*_SRGB`` formats are used to indicate the need to write with 'sRGB' metadata. If this flag is specified, 'sRGB' metadata with gamma 2.2 is always written even if the input format is not explicitly an ``DXGI_FORMAT_*_SRGB`` format. * ``TGA_FLAGS_FORCE_LINEAR`` When writing a file, if the type is not a ``DXGI_FORMAT_*_SRGB`` format, then metadata for a gamma of 1.0 is written to indicate the file is in linear color space. If this flag is specified, 1.0 gamma metadata is always written even if the input format is a ``DXGI_FORMAT_*_SRGB`` format. -> Using the FORCE flags above requires _metadata_ parameter for the TGA writer functions as they only impact TGA 2.0 metadata +> Using the ``_FORCE_`` flags above requires a non-null _metadata_ parameter for the TGA writer functions as they only impact TGA 2.0 metadata # Implementation Notes @@ -119,7 +119,7 @@ if ( FAILED(hr) ) * 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 does not support the ``TGA`` header extension metadata, which is ignored by the reader except for the alpha mode. The writer can optionally write the TGA 2.0 extension area. +* The reader does not support the ``TGA`` header extension metadata, which is ignored by the reader except for gamma and alpha mode. The writer can optionally write the TGA 2.0 extension area. * For 16-bit and 32-bit truecolor images, there is a special-case fixup if the entire alpha channel is 0. It is modified to be fully opaque unless you use ``TGA_FLAGS_ALLOW_ALL_ZERO_ALPHA``. # Windows Store apps