public void CanReadIFDFromFixedOffset(string filename, int offset, bool bigEndian, int tagCount) { using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) { var tiffStream = new TiffStreamReader(stream); var ifd0 = tiffStream.ReadIFD(8); Assert.Equal(23, ifd0.tags.Length); } }
public void CanReadRawIFD0Tags(string filename, int firstIfdTags, uint nextIfdOffset) { using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) { var tiffStream = new TiffStreamReader(stream); var ifd0 = tiffStream.ReadIFD(tiffStream.ReadHeader()); Assert.Equal(firstIfdTags, ifd0.tags.Length); Assert.Equal(nextIfdOffset, ifd0.nextIfd); } }