mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-23 13:00:06 +00:00
Updated PremultiplyAlpha (markdown)
parent
70e9663428
commit
9741faff3e
@ -3,11 +3,11 @@ This converts an image assuming the original is not using premultiplied alpha in
|
||||
**Breaking Change notice**: The 'flags' parameter was not present in the August 2013 and previous versions of DirectXTex.
|
||||
|
||||
HRESULT PremultiplyAlpha( const Image& srcImage, DWORD flags,
|
||||
ScratchImage& image, bool reverse = false );
|
||||
ScratchImage& image );
|
||||
|
||||
HRESULT PremultiplyAlpha( const Image* srcImages, size_t nimages,
|
||||
const TexMetadata& metadata, DWORD flags,
|
||||
ScratchImage& result, bool reverse = false );
|
||||
ScratchImage& result );
|
||||
|
||||
# Parameters
|
||||
|
||||
@ -19,7 +19,7 @@ This controls color space transformation for conversions.
|
||||
* *``TEX_PMALPHA_SRGB_OUT``* Indicates the output format is the sRGB format. This is implied if using a ``DXGI_FORMAT_*_SRGB`` format
|
||||
* *``TEX_PMALPHA_SRGB``* This is the same as setting both ``TEX_PMALPHA_SRGB_IN`` and ``TEX_PMALPHA_SRGB_OUT``
|
||||
|
||||
_reverse_: If set to true, then the conversion goes from premultipled alpha to nonpremultipled alpha (a.k.a. straight alpha).
|
||||
* *``TEX_PMALPHA_REVERSE`` If set to true, then the conversion goes from premultipled alpha to nonpremultipled alpha (a.k.a. straight alpha).
|
||||
|
||||
> Note that the conversion to premultipled alpha is not fully reversible. For example if alpha is 0, then all the color information becomes 0.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user