locked
How to write attributes to a bitmap (BitmapMetadata) in Compact Framework RRS feed

  • Question

  • In the .net 3.5 framework I would use the following to read values:

    BitmapDecoder decoder = BitmapDecoder.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.Default);
                            BitmapFrame frame = decoder.Frames[0];
                            BitmapMetadata metadata = frame.Metadata as BitmapMetadata;
                            System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(stream);
                            //bmp.Save(currentImageDirectory + aerialImageFileName);
                            //bmp.Dispose();


                            // Create the XML
                            image.CameraManufacturer = metadata.CameraManufacturer;
                            image.CameraModel = metadata.CameraModel;
                            image.DateTaken = metadata.DateTaken;
                            image.Width = bmp.Width;
                            image.Height = bmp.Height;

     

    But now I am creating images using DirectShow.  How do I write these using the Compact Framework since the BitmapMetadata function is missing.

    Something like this:

    http://www.dreamincode.net/code/snippet3144.htm

    Thanks,

    Linda

    Wednesday, September 29, 2010 11:54 AM