|
|
@ -7,9 +7,11 @@ namespace ImageSharp.Tests |
|
|
{ |
|
|
{ |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections; |
|
|
using System.Collections; |
|
|
|
|
|
using System.Collections.Generic; |
|
|
using System.IO; |
|
|
using System.IO; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
using ImageSharp.Processing; |
|
|
using Xunit; |
|
|
using Xunit; |
|
|
|
|
|
|
|
|
public class ExifProfileTests |
|
|
public class ExifProfileTests |
|
|
@ -268,6 +270,26 @@ namespace ImageSharp.Tests |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
|
|
public void ExifTypeUndefined() |
|
|
|
|
|
{ |
|
|
|
|
|
Image image = TestFile.Create(TestImages.Jpeg.Baseline.Bad.ExifUndefType).CreateImage(); |
|
|
|
|
|
Assert.NotNull(image); |
|
|
|
|
|
|
|
|
|
|
|
ExifProfile profile = image.MetaData.ExifProfile; |
|
|
|
|
|
Assert.NotNull(profile); |
|
|
|
|
|
|
|
|
|
|
|
IEnumerator<ExifValue> enumerator = profile.Values.GetEnumerator(); |
|
|
|
|
|
while (enumerator.MoveNext()) |
|
|
|
|
|
{ |
|
|
|
|
|
ExifValue entry = enumerator.Current; |
|
|
|
|
|
if (entry.DataType == ExifDataType.Undefined) |
|
|
|
|
|
{ |
|
|
|
|
|
Assert.NotEqual(0, entry.NumberOfComponents); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private static ExifProfile GetExifProfile() |
|
|
private static ExifProfile GetExifProfile() |
|
|
{ |
|
|
{ |
|
|
Image image = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan).CreateImage(); |
|
|
Image image = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan).CreateImage(); |
|
|
|