public JpegHeader ExtractHeader() { int num = jpegReader.ReadShort() - 2; byte[] array = new byte[num]; jpegReader.Read(array, 0, num); return(new JpegHeader { Marker = marker, Data = array }); }
private JpegHeader ExtractHeader() { #region Extract the header int length = jpegReader.ReadShort() - 2; byte[] data = new byte[length]; jpegReader.Read(data, 0, length); #endregion JpegHeader header = new JpegHeader() { Marker = marker, Data = data }; return(header); }