From f88b49de3bdf4dbb9ade50eb42bb7d218a7e7f20 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 22 Jun 2018 00:52:20 +0200 Subject: [PATCH] clear header for empty app1 section (fixes #45) --- ExifLibrary/JPEGFile.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ExifLibrary/JPEGFile.cs b/ExifLibrary/JPEGFile.cs index 8cc6496..84e9b28 100644 --- a/ExifLibrary/JPEGFile.cs +++ b/ExifLibrary/JPEGFile.cs @@ -705,7 +705,8 @@ private bool WriteExifApp1(bool preserveMakerNote) if (ifdzeroth.Count == 0 && ifdgps.Count == 0 && ifdinterop.Count == 0 && ifdfirst.Count == 0 && Thumbnail == null) { - // Nothing to write + // Nothing to write to App1 section + exifApp1.Header = new byte[0]; return false; }