Answered by:
can I store information into the metadata of a bitmap image?

Question
-
Can I put any custom information into the metadata of a bitmap image using Windows.UI.Xaml.Media.Imaging namespace?
Here's what I have so far:
BitmapImage bitmapImage = new BitmapImage(); using (IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read)) { bitmapImage.SetSource(fileStream); globalbitmapImage.SetSource(fileStream); var encoderId = Windows.Graphics.Imaging.BitmapEncoder.BmpEncoderId; var propertySet = new Windows.Graphics.Imaging.BitmapPropertySet(); string ImageValues = ProgramName + "|" + TrailerNumber + "|" + PicComments + "|" + globalfilePath; propertySet.Add( I need to put ImageValues in something here. } CapturedPhoto.Source = bitmapImage;
Tuesday, September 16, 2014 4:15 PM
Answers
-
Hello,
We adhere to the EXIF standard and we do not document how to add custom properties to photo metadata. The current recommendation is to use a supported generic string metadata policy. You can then encode your specific information into this generic policy. While this may not be ideal it should allow you to add the necessary data to the photo's metadata.
Reference:
Photo Metadata Policies
http://msdn.microsoft.com/en-us/library/windows/desktop/ee872003(v=vs.85).aspx
I hope this helps,
Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/
- Marked as answer by Jamles HezModerator Sunday, September 28, 2014 7:44 AM
Wednesday, September 17, 2014 9:46 PMModerator
All replies
-
Have you gone through the How To?
http://msdn.microsoft.com/en-us/library/windows/apps/hh465095.aspxBret Bentzinger (MSFT) @awehellyeah
Tuesday, September 16, 2014 8:53 PMModerator -
Good answer, you may be wondering where I got the original posted code..Wednesday, September 17, 2014 1:12 PM
-
Hello,
We adhere to the EXIF standard and we do not document how to add custom properties to photo metadata. The current recommendation is to use a supported generic string metadata policy. You can then encode your specific information into this generic policy. While this may not be ideal it should allow you to add the necessary data to the photo's metadata.
Reference:
Photo Metadata Policies
http://msdn.microsoft.com/en-us/library/windows/desktop/ee872003(v=vs.85).aspx
I hope this helps,
Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/
- Marked as answer by Jamles HezModerator Sunday, September 28, 2014 7:44 AM
Wednesday, September 17, 2014 9:46 PMModerator