private static int ReadInt(byte[] imageData, int offset) { return (imageData[offset] << 8) | imageData[offset + 1]; }