ImageGear v26.0 - Updated
UpdatePageMetadata Method




ImageGear.Core Assembly > ImageGear.Formats Namespace > ImGearFileFormats Class : UpdatePageMetadata Method
Data stream containing a source image.
Data stream to write the updated image to.
Page metadata tree to be saved to the new image.
Zero based page number to update the metadata for.
Updates page metadata without changing pixel data.
Syntax
'Declaration
 
Public Shared Sub UpdatePageMetadata( _
   ByVal sourceStream As Stream, _
   ByVal destinationStream As Stream, _
   ByVal metadata As ImGearMetadataHead, _
   ByVal pageNumber As Integer _
) 
'Usage
 
Dim sourceStream As Stream
Dim destinationStream As Stream
Dim metadata As ImGearMetadataHead
Dim pageNumber As Integer
 
ImGearFileFormats.UpdatePageMetadata(sourceStream, destinationStream, metadata, pageNumber)
public static void UpdatePageMetadata( 
   Stream sourceStream,
   Stream destinationStream,
   ImGearMetadataHead metadata,
   int pageNumber
)
public: static void UpdatePageMetadata( 
   Stream* sourceStream,
   Stream* destinationStream,
   ImGearMetadataHead* metadata,
   int pageNumber
) 
public:
static void UpdatePageMetadata( 
   Stream^ sourceStream,
   Stream^ destinationStream,
   ImGearMetadataHead^ metadata,
   int pageNumber
) 

Parameters

sourceStream
Data stream containing a source image.
destinationStream
Data stream to write the updated image to.
metadata
Page metadata tree to be saved to the new image.
pageNumber
Zero based page number to update the metadata for.
Exceptions
ExceptionDescription
Thrown if the specified stream is null or metadata parameter is null.

Thrown with ImGearErrorCodes.PAGE_NOT_PRESENT error code if the page with the specified page number does not exist in the image, or the page with the specified page number represents DICOM vector waveform data.

Thrown with ImGearErrorCodes.CANT_SAVE_FORMAT error code if the metadata cannot be updated due to invalid data in the source stream.

Remarks
This method replaces the metadata associated with the specified page loaded from the source image with the provided metadata and saves the updated image to the destination stream. This method does not replace the metadata assotiated with a document. This method does not change the actual pixel data. The structure of the provided metadata tree should correspond to the metadata tree from the source image. This method does not save any metadata tags provided in the metadata tree that are not supported by the source image format. See ImageGear.Core.ImGearMetadataNode for more details about the ImageGear metadata.
See Also

Reference

ImGearFileFormats Class
ImGearFileFormats Members

Is this page helpful?
Yes No
Thanks for your feedback.