horizontalScaleNearestAndCLU

Horizontal scaling using nearest integer algorithm for per-line operations. Uses arrays for source (compatible with data types smaller than 8 bit)

@nogc pure nothrow
void
horizontalScaleNearestAndCLU
(
ArrayType
U
)
(
ArrayType src
,
U* dest
,,
sizediff_t length
,,
sizediff_t offset = 0
)

Parameters

src ArrayType

Source of the line to be transformed. Must be large enough to support the destination output with the given transformation params.

dest U*

Destination of the transformed line.

palette U*

Palette. Should have enough elements for every index, or ensure that source wouldn't point that far.

length sizediff_t

Length of the output. Must be less or eaqual than the dest buffer. Use function "scaleNearestLength" to calculate the needed output length.

trfmParam int

Transformation parameter.

offset sizediff_t

Offset in the source line. This allows the source line to be offset by the given amount of fractional pixels. Default value is zero.

Meta