LEADTOOLS Image File Support (Leadtools.Codecs assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
CompactFile(Stream,Stream,Int32) Method
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class > CompactFile Method : CompactFile(Stream,Stream,Int32) Method



srcStream
A System.IO.Stream containing the data for the file being compacted. All the pages will be read from this stream.
destStream
A System.IO.Stream that will contain the data written.
pages
Value that represents the number of pages to copy. Use 0 to copy all the pages. If pages is > 0, only pages will be copied to destStream.
srcStream
A System.IO.Stream containing the data for the file being compacted. All the pages will be read from this stream.
destStream
A System.IO.Stream that will contain the data written.
pages
Value that represents the number of pages to copy. Use 0 to copy all the pages. If pages is > 0, only pages will be copied to destStream.
Compacts TIFF streams with default options.

Syntax

Visual Basic (Declaration) 
Overloads Public Sub CompactFile( _
   ByVal srcStream As Stream, _
   ByVal destStream As Stream, _
   ByVal pages As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim srcStream As Stream
Dim destStream As Stream
Dim pages As Integer
 
instance.CompactFile(srcStream, destStream, pages)
C# 
public void CompactFile( 
   Stream srcStream,
   Stream destStream,
   int pages
)
C++/CLI 
public:
void CompactFile( 
   Stream^ srcStream,
   Stream^ destStream,
   int pages
) 

Parameters

srcStream
A System.IO.Stream containing the data for the file being compacted. All the pages will be read from this stream.
destStream
A System.IO.Stream that will contain the data written.
pages
Value that represents the number of pages to copy. Use 0 to copy all the pages. If pages is > 0, only pages will be copied to destStream.

Example

For an an example, refer to CompactFile(String,String,Int32).

Remarks

This method can also be used to copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file. Whenever you save an image containing a region as a TIFF file format, the region is also saved. Note, however, that the ability to save a region inside a TIFF file must be unlocked. This requires a Document Imaging or Medical Imaging toolkit.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also