Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        private static void ClearExifDataKeepColorProfile(IMagickImage image)
        {
            var cp = image.GetColorProfile();

            image.Strip();
            image.Comment = "";
            if (cp != null)
            {
                image.AddProfile(cp);
            }
        }