BitmapMetadata.ApplicationName Property


Gets or sets a value that identifies the name of the application that was used to construct or alter an image file.

Namespace:   System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public string ApplicationName { get; set; }

Property Value

Type: System.String

The name of the application that was used to construct or alter an image file.

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. 
    decoder2.Frames[0].ColorContexts ) );

encoder3.Save( stream3 );

.NET Framework
Available since 3.0
Return to top