Bitconverter.GetBytes()

Hello,

What’s the purpose of the Byte[] GetBytes(Byte[] buffer, UInt32[] patternTable) method and how should it be used ?

That will convert position of element in array with a pattern table.

Example, if you have a patternTable that define how you rotate image, then just put the array and the table then you have new array data which is rotated, then just send the new image to target device.

In TinyCLR-Samples\Applications\EstaticLed project , take a look on “NativeCookData” function, here is good example to use that api.

1 Like

This is a lookup table, very fast one!

foreach x
data[x] = data[patternTable[x]];

A good example for it would be if you want to flip an image.

1 Like

Thank you !

Not sure I will use it for now, but this is still good to know :wink: