Add helper function to convert [sizeX sizeY] matrix into byte array
Add unit tests corresponding to new toByteArray() function
Update CreateImage example to use new toByteArray() function
Drop multi-channel requirement in CreateImage example
Merge pull request #1729 from sbesson/11624_tobytearray

Add Matlab helper function to convert matrix into byte array