Table of Contents

Method CreateLookupTable3D

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

CreateLookupTable3D(BufferPrecision, int, int, int, ExtentPtr<byte>, uint, uint)

Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. The table data must be provided in 4-channel format.
ID2D1DeviceContext2::CreateLookupTable3D()
ID2D1EffectContext1::CreateLookupTable3D()

ILookupTable3D CreateLookupTable3D(BufferPrecision precision, int extentX, int extentY, int extentZ, ExtentPtr<byte> data, uint rowStride, uint planeStride)

Parameters

precision BufferPrecision

Precision of the input lookup table data.

extentX int

The number of elements in the X dimension, which corresponds to the blue channel.

extentY int

The number of elements, or rows, in the Y dimension, which corresponds to the green channel.

extentZ int

The number of elements, or planes, in the Z dimension, which corresponds to the red channel.

data ExtentPtr<byte>

Buffer holding the lookup table data. This total byte size of the data buffer must be appropriate for the given precision and extents.

rowStride uint

The number of bytes from one row (X dimension) of LUT data to the next.

planeStride uint

The number of bytes from one LUT data plane (X and Y dimensions) to the next.

Returns

ILookupTable3D

Remarks

The maximum extent in any direction is 256, which means that a 256x256x256 table using 32-bits per component will consume 64MB. Because lookup uses linear interpolation, much smaller tables will usually give good results.