BitMiracle.LibTiff.Classic.Tiff.ByteArrayToShorts C# (CSharp) Method

ByteArrayToShorts() public static method

Converts a byte buffer into array of 16-bit values.
public static ByteArrayToShorts ( byte buffer, int offset, int count ) : short[]
buffer byte The byte buffer.
offset int The zero-based offset in at /// which to begin converting bytes.
count int The number of bytes to convert.
return short[]
        public static short[] ByteArrayToShorts(byte[] buffer, int offset, int count)
        {
            int shortCount = count / sizeof(short);
            short[] shorts = new short[shortCount];
            Buffer.BlockCopy(buffer, offset, shorts, 0, shortCount * sizeof(short));
            return shorts;
        }
Tiff