|
|
|
@ -311,7 +311,6 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Exif.Values |
|
|
|
{ ExifTag.ExifVersion }, |
|
|
|
{ ExifTag.ComponentsConfiguration }, |
|
|
|
{ ExifTag.MakerNote }, |
|
|
|
{ ExifTag.UserComment }, |
|
|
|
{ ExifTag.FlashpixVersion }, |
|
|
|
{ ExifTag.SpatialFrequencyResponse }, |
|
|
|
{ ExifTag.SpatialFrequencyResponse2 }, |
|
|
|
@ -319,6 +318,11 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Exif.Values |
|
|
|
{ ExifTag.CFAPattern }, |
|
|
|
{ ExifTag.DeviceSettingDescription }, |
|
|
|
{ ExifTag.ImageSourceData }, |
|
|
|
}; |
|
|
|
|
|
|
|
public static TheoryData<ExifTag> EncodedStringTags => new TheoryData<ExifTag> |
|
|
|
{ |
|
|
|
{ ExifTag.UserComment }, |
|
|
|
{ ExifTag.GPSProcessingMethod }, |
|
|
|
{ ExifTag.GPSAreaInformation } |
|
|
|
}; |
|
|
|
@ -593,5 +597,19 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Exif.Values |
|
|
|
var typed = (ExifByteArray)value; |
|
|
|
Assert.Equal(expected, typed.Value); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[MemberData(nameof(EncodedStringTags))] |
|
|
|
public void ExifEncodedStringTests(ExifTag tag) |
|
|
|
{ |
|
|
|
var expected = new EncodedString("test string", EncodedStringCode.JIS); |
|
|
|
ExifValue value = ExifValues.Create(tag); |
|
|
|
|
|
|
|
Assert.False(value.TrySetValue(expected.ToString())); |
|
|
|
Assert.True(value.TrySetValue(expected)); |
|
|
|
|
|
|
|
var typed = (ExifEncodedString)value; |
|
|
|
Assert.Equal(expected, typed.Value); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|