BitmapMetadata.CameraManufacturer Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that identifies the camera manufacturer that is associated with an image.
public:
property System::String ^ CameraManufacturer { System::String ^ get(); void set(System::String ^ value); };
public string CameraManufacturer { get; set; }
member this.CameraManufacturer : string with get, set
Public Property CameraManufacturer As String
Property Value
The camera manufacturer that is associated with an image.
Examples
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();
Dim stream3 As New FileStream("image2.tif", FileMode.Create)
Dim myBitmapMetadata As New BitmapMetadata("tiff")
Dim encoder3 As New TiffBitmapEncoder()
myBitmapMetadata.ApplicationName = "Microsoft Digital Image Suite 10"
myBitmapMetadata.Author = New ReadOnlyCollection(Of String) _
(New List(Of String)(New 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(Of String) _
(New List(Of String)(New 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()
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.