BitmapMetadata.CameraModel Property
.NET Framework 4.5
Gets or sets a value that identifies the camera model that was used to capture the image.
Namespace: System.Windows.Media.Imaging
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The following code example shows how to write metadata to a bitmap image by using friendly properties of the BitmapMetadata class.
FileStream stream3 = new FileStream( "image2.tif", FileMode.Create ); BitmapMetadata myBitmapMetadata = new BitmapMetadata( "tiff" ); TiffBitmapEncoder encoder3 = new TiffBitmapEncoder(); myBitmapMetadata.ApplicationName = "Microsoft Digital Image Suite 10"; myBitmapMetadata.Author = new ReadOnlyCollection<string>( new List<string>() { "Lori Kane" } ); myBitmapMetadata.CameraManufacturer = "Tailspin Toys"; myBitmapMetadata.CameraModel = "TT23"; myBitmapMetadata.Comment = "Nice Picture"; myBitmapMetadata.Copyright = "2010"; myBitmapMetadata.DateTaken = "5/23/2010"; myBitmapMetadata.Keywords = new ReadOnlyCollection<string>( new List<string>() { "Lori", "Kane" } ); myBitmapMetadata.Rating = 5; myBitmapMetadata.Subject = "Lori"; myBitmapMetadata.Title = "Lori's photo"; // Create a new frame that is identical to the one // from the original image, except for the new metadata. encoder3.Frames.Add( BitmapFrame.Create( decoder2.Frames[0], decoder2.Frames[0].Thumbnail, myBitmapMetadata, decoder2.Frames[0].ColorContexts ) ); encoder3.Save( stream3 ); stream3.Close();
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.