Browse Source

skipping exif id code before extending the exif profile

af/merge-core
popow 8 years ago
parent
commit
8b0b7ab1b4
  1. 2
      src/ImageSharp/Formats/Jpeg/PdfJsPort/PdfJsJpegDecoderCore.cs
  2. 5
      src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs

2
src/ImageSharp/Formats/Jpeg/PdfJsPort/PdfJsJpegDecoderCore.cs

@ -489,7 +489,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort
else
{
// if the exif information exceeds 64K, it will be split over multiple APP1 marker
this.MetaData.ExifProfile.Extend(profile);
this.MetaData.ExifProfile.Extend(profile.Skip(6).ToArray());
}
}
}

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

@ -237,9 +237,8 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
int currentLength = this.data.Length;
// the first 6 bytes are Exif00 and will be skipped
Array.Resize(ref this.data, currentLength + bytes.Length - 6);
Buffer.BlockCopy(bytes, 6, this.data, currentLength, bytes.Length - 6);
Array.Resize(ref this.data, currentLength + bytes.Length);
Buffer.BlockCopy(bytes, 0, this.data, currentLength, bytes.Length);
}
/// <summary>

Loading…
Cancel
Save