Set metadata for existing file #1427
Answered
by
brianpopow
BorisWilhelms
asked this question in
Q&A
-
I am trying to update EXIF information for a bunch of file. Unfortunately some of the files to not have metadata (Metadata property is null). How can I add a metadata object to an existing file, if it is null. The property itself is readonly (get-only). Example code: using var image = Image.Load(file.FullName);
if (image.Metadata == null)
{
Console.WriteLine($"{file.Name}: No metadata found.");
return;
} |
Beta Was this translation helpful? Give feedback.
Answered by
brianpopow
Nov 15, 2020
Replies: 1 comment 1 reply
-
The Metadata property should always be != null. It is possible that the Exif field of metadata has no value, if the image has no Exif profile.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
BorisWilhelms
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Metadata property should always be != null. It is possible that the Exif field of metadata has no value, if the image has no Exif profile.