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

Rename Evaluate and Transform

Chuck Walbourn 2016-09-19 11:34:48 -07:00
parent 6597a3c4b9
commit ee9286f240
3 changed files with 7 additions and 7 deletions

@ -74,8 +74,8 @@ _The majority of these functions cannot operate on planar or palettized formats.
* [[ComputeNormalMap]] - Converts a height-map to a normal-map
* [[CopyRectangle]] - Copies a rectangle from a soure image to a destination image. Does not support block compressed formats
* [[ComputeMSE]] - Computes the mean-squared error for each component based on two input images
* [[Evaluate]] - Evaluates a user-defined function for an input image
* [[Transform]] - Create a new image from an existing image with a user-defined function
* [[EvaluateImage]] - Evaluates a user-defined function for an input image
* [[TransformImage]] - Create a new image from an existing image with a user-defined function
See [[Filter Flags]], [[Texconv]], [[Texassemble]]

@ -1,6 +1,6 @@
Evaluates a user-supplied function across an image.
HRESULT __valuate(const Image& image,
HRESULT EvaluateImage(const Image& image,
std::function<
void(const XMVECTOR* pixels, size_t width, size_t y)
> pixelFunc );
@ -14,7 +14,7 @@ _pixelFunc_: A callback function to invoke for each scanline of the image.
This function computes the maximum luminance of an input.
XMVECTOR maxLum = XMVectorZero();
HRESULT hr = Evaluate(*image.GetImage(0, 0, 0),
HRESULT hr = EvaluateImage(*image.GetImage(0, 0, 0),
[&](const XMVECTOR* pixels, size_t width, size_t y)
{
UNREFERENCED_PARAMETER(y);

@ -1,13 +1,13 @@
Creates a new image by executing a user-supplied function across an input image.
HRESULT Transform(
HRESULT TransformImage(
const Image& image,
std::function<
void(XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y)
> pixelFunc,
ScratchImage& result );
HRESULT Transform(
HRESULT TransformImage(
const Image* srcImages, size_t nimages, const TexMetadata& metadata,
std::function<
void(XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y)
@ -21,7 +21,7 @@ _pixelFunc_: A callback function to invoke for each scanline of the image which
# Example
This function performs a colorkey or [chromakey](https://en.wikipedia.org/wiki/Chroma_key) transformation setting alpha to 0 (transparent) wherever the color is found and 1 (opaque) otherwise.
hr = Transform(image->GetImages(), image->GetImageCount(), image->GetMetadata(),
hr = TransformImage(image->GetImages(), image->GetImageCount(), image->GetMetadata(),
[](XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y)
{
static const XMVECTORF32 s_chromaKey = { 0.f, 1.f, 0.f, 0.f };