InPlaceBitmapMetadataWriter Class
Enables in-place updates to existing blocks of BitmapMetadata.
System.Windows.Threading::DispatcherObject
System.Windows::DependencyObject
System.Windows::Freezable
System.Windows.Media::ImageMetadata
System.Windows.Media.Imaging::BitmapMetadata
System.Windows.Media.Imaging::InPlaceBitmapMetadataWriter
Assembly: PresentationCore (in PresentationCore.dll)
The InPlaceBitmapMetadataWriter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ApplicationName | Gets or sets a value that identifies the name of the application that was used to construct or alter an image file. (Inherited from BitmapMetadata.) |
![]() | Author | Gets or sets a value that represents the author of an image. (Inherited from BitmapMetadata.) |
![]() | CameraManufacturer | Gets or sets a value that identifies the camera manufacturer that is associated with an image. (Inherited from BitmapMetadata.) |
![]() | CameraModel | Gets or sets a value that identifies the camera model that was used to capture the image. (Inherited from BitmapMetadata.) |
![]() | CanFreeze | Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.) |
![]() | Comment | Gets or sets a value that represents a comment that is associated with the image file. (Inherited from BitmapMetadata.) |
![]() | Copyright | Gets or sets a value that indicates copyright information that is associated with the image file. (Inherited from BitmapMetadata.) |
![]() | DateTaken | Gets or sets a value that indicates the date that the image was taken. (Inherited from BitmapMetadata.) |
![]() | DependencyObjectType | Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject.) |
![]() | Dispatcher | Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.) |
![]() | Format | Gets a value that identifies the format of the image. (Inherited from BitmapMetadata.) |
![]() | IsFixedSize | Gets a value that determines whether the BitmapMetadata object is a fixed size. (Inherited from BitmapMetadata.) |
![]() | IsFrozen | Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable.) |
![]() | IsReadOnly | Gets a value that indicates whether the metadata that is associated with an image is read-only. (Inherited from BitmapMetadata.) |
![]() | IsSealed | Gets a value that indicates whether this instance is currently sealed (read-only). (Inherited from DependencyObject.) |
![]() | Keywords | Gets or sets a collection of keywords that describe the bitmap image. (Inherited from BitmapMetadata.) |
![]() | Location | Gets a value that identifies the base location of the metadata that is associated with an image. (Inherited from BitmapMetadata.) |
![]() | Rating | Gets or sets a value that identifies the image rating. (Inherited from BitmapMetadata.) |
![]() | Subject | Gets or sets a value that indicates the subject matter of the bitmap image. (Inherited from BitmapMetadata.) |
![]() | Title | Gets or sets a value that identifies the title of an image file. (Inherited from BitmapMetadata.) |
| Name | Description | |
|---|---|---|
![]() | CheckAccess | Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.) |
![]() | ClearValue(DependencyProperty) | Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.) |
![]() | ClearValue(DependencyPropertyKey) | Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.) |
![]() | Clone | Creates a modifiable clone of this InPlaceBitmapMetadataWriter, making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. |
![]() | CloneCore | Makes this instance a deep copy of the specified BitmapMetadata. (Inherited from BitmapMetadata.) |
![]() | CloneCurrentValue | Creates a modifiable clone (deep copy) of the Freezable using its current values. (Inherited from Freezable.) |
![]() | CloneCurrentValueCore | Makes this instance a modifiable deep copy of the specified BitmapMetadata using current property values. Resource references, data bindings, and animations are not copied, but their current values are. (Inherited from BitmapMetadata.) |
![]() | CoerceValue | Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject. (Inherited from DependencyObject.) |
![]() | ContainsQuery | Determines whether a given query string exists within a BitmapMetadata object. (Inherited from BitmapMetadata.) |
![]() | CreateInstance | Initializes a new instance of the Freezable class. (Inherited from Freezable.) |
![]() | CreateInstanceCore | An Implementation of CreateInstance. (Inherited from BitmapMetadata.) |
![]() | Equals | Determines whether a provided DependencyObject is equivalent to the current DependencyObject. (Inherited from DependencyObject.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | Freeze() | Makes the current object unmodifiable and sets its IsFrozen property to true. (Inherited from Freezable.) |
![]() | FreezeCore | Makes the Freezable object unmodifiable or tests whether it can be made unmodifiable. (Inherited from Freezable.) |
![]() | GetAsFrozen | Creates a frozen copy of the Freezable, using base (non-animated) property values. Because the copy is frozen, any frozen sub-objects are copied by reference. (Inherited from Freezable.) |
![]() | GetAsFrozenCore | Makes this instance a clone of the specified BitmapMetadata object. (Inherited from BitmapMetadata.) |
![]() | GetCurrentValueAsFrozen | Creates a frozen copy of the Freezable using current property values. Because the copy is frozen, any frozen sub-objects are copied by reference. (Inherited from Freezable.) |
![]() | GetCurrentValueAsFrozenCore | Makes this instance a frozen clone of the specified BitmapMetadata. Resource references, data bindings, and animations are not copied, but their current values are. (Inherited from BitmapMetadata.) |
![]() | GetHashCode | Gets a hash code for this DependencyObject. (Inherited from DependencyObject.) |
![]() | GetLocalValueEnumerator | Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.) |
![]() | GetQuery | Provides access to a metadata query reader that can extract metadata from a bitmap image file. (Inherited from BitmapMetadata.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetValue | Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.) |
![]() | InvalidateProperty | Re-evaluates the effective value for the specified dependency property (Inherited from DependencyObject.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnChanged | Called when the current Freezable object is modified. (Inherited from Freezable.) |
![]() | OnFreezablePropertyChanged(DependencyObject, DependencyObject) | Ensures that appropriate context pointers are established for a DependencyObjectType data member that has just been set. (Inherited from Freezable.) |
![]() | OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. (Inherited from Freezable.) |
![]() | OnPropertyChanged | Overrides the DependencyObject implementation of OnPropertyChanged to also invoke any Changed handlers in response to a changing dependency property of type Freezable. (Inherited from Freezable.) |
![]() | ReadLocalValue | Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject.) |
![]() | ReadPreamble | Ensures that the Freezable is being accessed from a valid thread. Inheritors of Freezable must call this method at the beginning of any API that reads data members that are not dependency properties. (Inherited from Freezable.) |
![]() | RemoveQuery | Removes a metadata query from an instance of BitmapMetadata. (Inherited from BitmapMetadata.) |
![]() | SetCurrentValue | Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject.) |
![]() | SetQuery | Provides access to a metadata query writer that can write metadata to a bitmap image file. (Inherited from BitmapMetadata.) |
![]() | SetValue(DependencyProperty, Object) | Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.) |
![]() | SetValue(DependencyPropertyKey, Object) | Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property. (Inherited from DependencyObject.) |
![]() | ShouldSerializeProperty | Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property. (Inherited from DependencyObject.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TrySave | Gets a value that indicates whether image metadata can be saved successfully. |
![]() | VerifyAccess | Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.) |
![]() | WritePostscript | Raises the Changed event for the Freezable and invokes its OnChanged method. Classes that derive from Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties. (Inherited from Freezable.) |
![]() | WritePreamble | Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. Freezable inheritors should call this method at the beginning of any API that writes to data members that are not dependency properties. (Inherited from Freezable.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IEnumerable<String>::GetEnumerator | Infrastructure. For a description of this member, see IEnumerable<T>::GetEnumerator. (Inherited from BitmapMetadata.) |
![]() ![]() | IEnumerable::GetEnumerator | Infrastructure. For a description of this member, see IEnumerable::GetEnumerator. (Inherited from BitmapMetadata.) |
If BitmapMetadata is not associated with a BitmapFrame that is obtained through a BitmapDecoder, the attempt to write metadata by using the in-place writer will fail. Successful write operations apply the metadata directly to the image stream by means of a decoder.
In-place metadata updates fail if an attempt is made to write metadata that a given bitmap format does not support.
To perform in-place metadata edits, the bitmap must be decoded using either the Default or OnDemand cache options. OnLoad does not guarantee access to the metadata stream needed for in-place metadata edits.
This example shows how you can modify metadata within an image without having to re-encode the image. The following example uses an InPlaceBitmapMetadataWriter to write metadata into an image.
Stream^ pngStream = gcnew FileStream("smiley.png", FileMode::Open, FileAccess::ReadWrite, FileShare::ReadWrite); PngBitmapDecoder^ pngDecoder = gcnew PngBitmapDecoder(pngStream, BitmapCreateOptions::PreservePixelFormat, BitmapCacheOption::Default); BitmapFrame^ pngFrame = pngDecoder->Frames[0]; InPlaceBitmapMetadataWriter^ pngInplace = pngFrame->CreateInPlaceBitmapMetadataWriter(); if (pngInplace->TrySave() == true) { pngInplace->SetQuery("/Text/Description", "Have a nice day."); } pngStream->Close();
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
