N
Nils Wolf
hi,
how do i convert an integer array to a byte array??
how do i convert an integer array to a byte array??
Nils Wolf said:how do i convert an integer array to a byte array??
Nils Wolf said:hi,
how do i convert an integer array to a byte array??
David Browne said:Hey,
Dim i(300, 300) As Integer
i(0, 0) = 2
Dim bytes As Integer = Buffer.ByteLength(i)
Dim b(bytes - 1) As Byte
Buffer.BlockCopy(i, 0, b, 0, bytes)
David
Nils Wolf said:ok, i have another problem with this.
the conversion from the int array to byte works fine.
but i have problems with the conversion back from the byte to the int.
when i have the byte array how do i get the original dimensions of the
array i converted to the byte array or is this not possible?
example:
i(1,1) --> i.getlength(0) --> 16
i(2,1) --> i.getlength(0) --> 24
i(1,2) --> i.getlength(0) --> is also 24