コード例 #1
0
        public void GetPhotometricInterpretation_ReturnsValue(ByteOrder byteOrder, TiffType type, int?data, TiffPhotometricInterpretation?expectedResult)
        {
            var ifd = TiffIfdBuilder.GenerateIfd(TiffTags.PhotometricInterpretation, type, data, byteOrder).Ifd;

            var result = ifd.GetPhotometricInterpretation(byteOrder);

            Assert.Equal(expectedResult, result);
        }
コード例 #2
0
        public void GetFillOrder_ReturnsValue(ByteOrder byteOrder, TiffType type, int?data, TiffFillOrder expectedResult)
        {
            var ifd = TiffIfdBuilder.GenerateIfd(TiffTags.FillOrder, type, data, byteOrder).Ifd;

            var result = ifd.GetFillOrder(byteOrder);

            Assert.Equal(expectedResult, result);
        }
コード例 #3
0
        public void GetGrayResponseUnit_ReturnsValue(ByteOrder byteOrder, TiffType type, int?data, double expectedResult)
        {
            var ifd = TiffIfdBuilder.GenerateIfd(TiffTags.GrayResponseUnit, type, data, byteOrder).Ifd;

            var result = ifd.GetGrayResponseUnit(byteOrder);

            Assert.Equal(expectedResult, result);
        }
コード例 #4
0
        public async Task ReadExtraSamplesAsync_ReturnsValue(ByteOrder byteOrder, TiffType type, uint[] data, TiffExtraSamples[] expectedResult)
        {
            var ifdStreamTuple = TiffIfdBuilder.GenerateIfd(TiffTags.ExtraSamples, type, data, byteOrder);
            var ifd            = ifdStreamTuple.Ifd;
            var stream         = ifdStreamTuple.Stream;

            var result = await ifd.ReadExtraSamplesAsync(stream, byteOrder);

            Assert.Equal(expectedResult, result);
        }