locked
can I store information into the metadata of a bitmap image? RRS feed

  • 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,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, September 17, 2014 9:46 PM
    Moderator

All replies