LEADTOOLS Image File Support (Leadtools.Codecs assembly)

LoadOptions(Stream) Method

Show in webframe







A System.IO.Stream containing the options to load
Loads the options into this RasterCodecs from a stream.
Syntax
public void LoadOptions( 
   Stream stream
)
'Declaration
 
Public Overloads Sub LoadOptions( _
   ByVal stream As Stream _
) 
'Usage
 
Dim instance As RasterCodecs
Dim stream As Stream
 
instance.LoadOptions(stream)
public void LoadOptions( 
   Stream stream
)

            

            
 function Leadtools.Codecs.RasterCodecs.LoadOptions(Stream)( 
   stream 
)
public:
void LoadOptions( 
   Stream^ stream
) 

Parameters

stream
A System.IO.Stream containing the options to load
Remarks

The RasterCodecs options can be easily saved to a disk or stream using SaveOptions(string fileName) or SaveOptions(Stream stream) and then loaded back into the same or a different RasterCodecs object using LoadOptions(string fileName) or LoadOptions(Stream stream).

Saving and loading the options is handy for situations where a RasterCodecs with specialized options other than the default is used. For example, in a server application as demonstrated by the example.

The options are saved in a standard XML file (with UTF-8 encoding) in the following format:


            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
            <leadtools_raster_codecs>
              <options>
                 <option FullPropertyName="value" />
              </options>
            </leadtools_raster_codecs>
            

FullPropertyName is the exact .NET property name of the options as accessed by the RasterCodecs object, for example, if you have a RasterCodecs object called rasterCodecsInstance, then you can access the CodecsRasterizeDocumentLoadOptions.XResolution using:


            rasterCodecsInstance.RasterizeDocument.Load.XResolution
            

And hence, the FullPropertyName if this option will be RasterizeDocument.Load.XResolution.

The LoadOptions(string fileName) and LoadOptions(Stream stream) methods will merge the content of the XML file with the current RasterCodecs options. Therefore, you can delete any option elements that do not override the default behavior from the file if desired.

Example

For an example, refer to LoadOptions(string fileName).

Requirements

Target Platforms

See Also

Reference

RasterCodecs Class
RasterCodecs Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.