1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-09 22:40:06 +00:00

Updated Convert (markdown)

Chuck Walbourn 2023-08-20 11:07:31 -07:00
parent a246fff9b8
commit cd3503b0a6

@ -16,6 +16,21 @@ HRESULT Convert(
float threshold, ScratchImage& result );
```
```cpp
HRESULT ConvertEx(
const Image& srcImage,
DXGI_FORMAT format, const ConvertOptions& options,
ScratchImage& image,
std::function<bool (size_t, size_t)> statusCallBack = nullptr);
HRESULT ConvertEx(
const Image* srcImages,
size_t nimages, const TexMetadata& metadata,
DXGI_FORMAT format, const ConvertOptions& options,
ScratchImage& result,
std::function<bool (size_t, size_t)> statusCallBack = nullptr);
```
# Parameters
_format_: Target format for conversion.
@ -24,6 +39,10 @@ _filter_: One or more [[Filter Flags]]. The default value is ``TEX_FILTER_DEFAUL
_threshold_: Alpha threshold used for converting to single bit alpha channels (0.0 to 1.0 range). Typically use is to pass ``TEX_THRESHOLD_DEFAULT`` (0.5).
_options_: The Ex versions take the parameters _filter_, _threshold_, etc. using the ``ConvertOptions`` structure.
_statusCallBack_: This is an optional status callback invoked during processing. If the function returns **false**, then the method is exited with an ``E_ABORT``.
# Example
```cpp