private static void SetExifProfile(IMagickImage image) { var exifProfile = image.GetExifProfile(); if (exifProfile == null) { exifProfile = new ExifProfile(); } else { var orientation = exifProfile.GetValue(ExifTag.Orientation); if (orientation != null) { RotateImageBasedOnOrientation(image); } exifProfile.RemoveValue(ExifTag.Orientation); } exifProfile.SetValue(ExifTag.Copyright, AppSettings.Copyright); //image.RemoveProfile(ProfileTypes.Exif.ToString()); image.AddProfile(exifProfile); }
private static void ClearExifDataKeepColorProfile(IMagickImage image) { var cp = image.GetColorProfile(); image.Strip(); image.Comment = ""; if (cp != null) { image.AddProfile(cp); } }