SaveXMPMetadata(Stream,Stream) Method (original) (raw)

Summary

Saves all XMP metadata from the source XML file to the destination image file.

Syntax

Parameters

sourceStream
A Stream containing the source XML file from which the metadata should be read.

destStream
A Stream containing the destination image file to which the metadata should be written.

Example

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; using Leadtools.Svg; public void SaveXMPMetadataExample() { // The source file string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf"); string xmlFileName = Path.Combine(LEAD_VARS.ImagesDir, "XMP.xml"); string dstFileName = Path.Combine(LEAD_VARS.ImagesDir, "cannon.jpg"); using (var codecs = new RasterCodecs()) { try { //Extract XMP Metadata & save it to a XML file. codecs.ExtractXMPMetadata(srcFileName, xmlFileName); /* Add/Update Metamata in the XML file using any XML parser(if needed). */ //Save XMP Metadata to a destination file using XML file that contains XMP Metadata. codecs.SaveXMPMetadata(xmlFileName, dstFileName); } catch (RasterException ex) { Debug.WriteLine(ex.Message); } } } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools.Codecs Assembly

CompactFile(Stream,Stream,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(Stream,Stream,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

CompactFile(string,string,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(string,string,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

StartCompress(int,int,int,RasterByteOrder,RasterViewPerspective,int,byte[],int,int,CodecsCompression,CodecsCompressDataCallback) Method