fromFormat

Converts the format of a sequence of color bytes.

@safe nothrow pure
ubyte[]
fromFormat
(
int format1
int format2
)
(
ubyte[] pixels
)
out (r; validateBytes!format2(r), "The out pixels data is incorrect!")

Parameters

format1

What is the original format.

format2

What format should be converted.

pixels ubyte[]

Sequence of color bytes.

Return Value

Type: ubyte[]

An array of bytes in the order specified in the pattern according to the pixel format.

Meta