コード例 #1
0
        public void ExifTypeUndefined()
        {
            // This image contains an 802 byte EXIF profile
            // It has a tag with an index offset of 18,481,152 bytes (overrunning the data)
            using Image <Rgba32> image = TestFile.Create(TestImages.Jpeg.Progressive.Bad.ExifUndefType).CreateRgba32Image();
            Assert.NotNull(image);

            ExifProfile profile = image.Metadata.ExifProfile;

            Assert.NotNull(profile);

            foreach (ExifValue value in profile.Values)
            {
                if (value.DataType == ExifDataType.Undefined)
                {
                    Assert.True(value.IsArray);
                    Assert.Equal(4U, 4 * ExifDataTypes.GetSize(value.DataType));
                }
            }
        }