Browse Source

update JIS test

pull/1935/head
Ildar Khayrutdinov 4 years ago
parent
commit
19a7b8c62e
  1. 12
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs
  2. 4
      tests/Images/Input/Jpg/baseline/Calliphora_encoded_strings.jpg

12
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs

@ -318,8 +318,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
exif.SetValue(ExifTag.XPKeywords, "Keyword1;Keyword2");
exif.SetValue(ExifTag.XPSubject, "This is a subject");
exif.SetValue(ExifTag.UserComment, new EncodedString(EncodedString.CharacterCode.ASCII, "user comment (ASCII)"));
exif.SetValue(ExifTag.GPSProcessingMethod, new EncodedString(EncodedString.CharacterCode.JIS, "GPS processing method (JIS)"));
exif.SetValue(ExifTag.UserComment, new EncodedString(EncodedString.CharacterCode.JIS, "本日は晴天なり(JIS)"));
exif.SetValue(ExifTag.GPSProcessingMethod, new EncodedString(EncodedString.CharacterCode.ASCII, "GPS processing method (ASCII)"));
exif.SetValue(ExifTag.GPSAreaInformation, new EncodedString(EncodedString.CharacterCode.Unicode, "GPS area info (Unicode)"));
image.Metadata.ExifProfile = exif;
@ -357,11 +357,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
Assert.Equal("Keyword1;Keyword2", exif.GetValue(ExifTag.XPKeywords).Value);
Assert.Equal("This is a subject", exif.GetValue(ExifTag.XPSubject).Value);
Assert.Equal("user comment (ASCII)", exif.GetValue(ExifTag.UserComment).Value.Text);
Assert.Equal(EncodedString.CharacterCode.ASCII, exif.GetValue(ExifTag.UserComment).Value.Code);
Assert.Equal("本日は晴天なり(JIS)", exif.GetValue(ExifTag.UserComment).Value.Text);
Assert.Equal(EncodedString.CharacterCode.JIS, exif.GetValue(ExifTag.UserComment).Value.Code);
Assert.Equal("GPS processing method (JIS)", exif.GetValue(ExifTag.GPSProcessingMethod).Value.Text);
Assert.Equal(EncodedString.CharacterCode.JIS, exif.GetValue(ExifTag.GPSProcessingMethod).Value.Code);
Assert.Equal("GPS processing method (ASCII)", exif.GetValue(ExifTag.GPSProcessingMethod).Value.Text);
Assert.Equal(EncodedString.CharacterCode.ASCII, exif.GetValue(ExifTag.GPSProcessingMethod).Value.Code);
Assert.Equal("GPS area info (Unicode)", (string)exif.GetValue(ExifTag.GPSAreaInformation).Value);
Assert.Equal(EncodedString.CharacterCode.Unicode, exif.GetValue(ExifTag.GPSAreaInformation).Value.Code);

4
tests/Images/Input/Jpg/baseline/Calliphora_encoded_strings.jpg

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e4398f3573ab7fd2aaeb88462061edff27f9fa0c86d8ec84808a736807fcdce
size 258077
oid sha256:9fd6fa56680f00e8834203c8094e79c582c9cc0146b36e7607a6f5453f058237
size 258078

Loading…
Cancel
Save