From df8a67be0addf6a03a5cabbceb6e54c6d77837bf Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 21 Sep 2017 23:59:36 +1000 Subject: [PATCH] App1Marker --- .../Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs index 8015d160a..3c1924c23 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs @@ -505,8 +505,12 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort byte[] profile = new byte[remaining]; this.InputProcessor.ReadFull(profile, 0, remaining); - if (profile[0] == 'E' && profile[1] == 'x' && profile[2] == 'i' && profile[3] == 'f' && profile[4] == '\0' - && profile[5] == '\0') + if (profile[0] == OrigJpegConstants.Exif.E && + profile[1] == OrigJpegConstants.Exif.X && + profile[2] == OrigJpegConstants.Exif.I && + profile[3] == OrigJpegConstants.Exif.F && + profile[4] == OrigJpegConstants.Exif.Null && + profile[5] == OrigJpegConstants.Exif.Null) { this.isExif = true; this.MetaData.ExifProfile = new ExifProfile(profile);