Browse Source

Fix broken EXIF test

af/merge-core
James Jackson-South 9 years ago
parent
commit
5a8474634c
  1. 8
      src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs
  2. 3
      src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs

8
src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.IO; using System.IO;
@ -82,10 +83,9 @@ namespace ImageSharp
this.values.Add(new ExifValue(value)); this.values.Add(new ExifValue(value));
} }
} }
else
{ this.data = new byte[other.data.Length];
this.data = other.data; Buffer.BlockCopy(other.data, 0, this.data, 0, other.data.Length);
}
} }
/// <summary> /// <summary>

3
src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs

@ -59,7 +59,8 @@ namespace ImageSharp
Guard.NotNull(other, nameof(other)); Guard.NotNull(other, nameof(other));
// TODO: Do we need to copy anything else? // TODO: Do we need to copy anything else?
this.data = other.data; this.data = new byte[other.data.Length];
Buffer.BlockCopy(other.data, 0, this.data, 0, other.data.Length);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save