|
|
|
@ -87,6 +87,17 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Exif |
|
|
|
new ExifProfile(Array.Empty<byte>()); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void EmptyWriter() |
|
|
|
{ |
|
|
|
var profile = new ExifProfile() { Parts = ExifParts.GpsTags }; |
|
|
|
profile.SetValue(ExifTag.Copyright, "Copyright text"); |
|
|
|
|
|
|
|
byte[] bytes = profile.ToByteArray(); |
|
|
|
Assert.NotNull(bytes); |
|
|
|
Assert.Empty(bytes); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void ConstructorCopy() |
|
|
|
{ |
|
|
|
@ -498,7 +509,6 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Exif |
|
|
|
|
|
|
|
// Assert
|
|
|
|
int ifdOffset = ExifConstants.LittleEndianByteOrderMarker.Length; |
|
|
|
|
|
|
|
Assert.Equal(8U, BinaryPrimitives.ReadUInt32LittleEndian(actualBytes.Slice(ifdOffset, 4))); |
|
|
|
|
|
|
|
int nextIfdPointerOffset = ExifConstants.LittleEndianByteOrderMarker.Length + 4 + 2 + 12; |
|
|
|
|