Created
January 18, 2017 18:57
-
-
Save bleroy/448ee814d2aa2077af2a522f58ec8746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exif = image.ExifProfile; | |
var description = exif.GetValue(ImageSharpExifTag.ImageDescription); | |
var yearTaken = DateTime.ParseExact( | |
(string)exif.GetValue(ImageSharpExifTag.DateTimeOriginal).Value, | |
"yyyy:MM:dd HH:mm:ss", | |
CultureInfo.InvariantCulture) | |
.Year; | |
var author = exif.GetValue(ImageSharpExifTag.Artist); | |
var copyright = $"{description} (c) {yearTaken} {author}"; | |
exif.SetValue(ImageSharpExifTag.Copyright, copyright); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment