VintaSoft Twain .NET SDK v10.2
Save(Stream,TwainImageEncoderSettings) Method




Vintasoft.WpfTwain Namespace > AcquiredImage Class > Save Method : Save(Stream,TwainImageEncoderSettings) Method
The System.IO.Stream where the image must be saved.
Encoder settings.
Saves this image to a specified stream in the specified format and with specified encoder settings.
Syntax
'Declaration
 
Public Overloads Sub Save( _
   ByVal stream As Stream, _
   ByVal encoderSettings As TwainImageEncoderSettings _
) 
'Usage
 
Dim instance As AcquiredImage
Dim stream As Stream
Dim encoderSettings As TwainImageEncoderSettings
 
instance.Save(stream, encoderSettings)
public void Save( 
   Stream stream,
   TwainImageEncoderSettings encoderSettings
)
public: void Save( 
   Stream* stream,
   TwainImageEncoderSettings* encoderSettings
) 
public:
void Save( 
   Stream^ stream,
   TwainImageEncoderSettings^ encoderSettings
) 

Parameters

stream
The System.IO.Stream where the image must be saved.
encoderSettings
Encoder settings.
Exceptions
ExceptionDescription
Thrown if stream is null or encoderSettings is null.
Thrown if error occurs at the image saving.
Remarks
Image can be:
- saved as image file (BMP, GIF, JPEG, PNG, TIFF)
- added to multipage TIFF file
- saved into new PDF or PDF/A document
- added to existing PDF or PDF/A document

Available compressions for images saved into TIFF file:
- without compression
- CCITT Group 4 Fax compression
- LZW compression
- ZIP compression
- JPEG compression

Available compressions for images saved into PDF document:
- without compression
- CCITT Group 4 Fax compression
- LZW compression
- ZIP compression
- JPEG compression

Image can be added to a PDF document compatible with version 1.4 or earlier of PDF standard.


Image will be saved as BMP file if encoderSettings is not null and encoderSettings is an /// instance of type Vintasoft.WpfTwain.ImageEncoders.TwainBmpEncoderSettings.

Image will be saved as GIF file if encoderSettings is not null and encoderSettings is an instance of type Vintasoft.WpfTwain.ImageEncoders.TwainGifEncoderSettings.

Image will be saved as JPEG file if encoderSettings is not null and encoderSettings is an instance of type Vintasoft.WpfTwain.ImageEncoders.TwainJpegEncoderSettings.

Image will be saved as PDF file if encoderSettings is not null and encoderSettings is an instance of type Vintasoft.WpfTwain.ImageEncoders.TwainPdfEncoderSettings.

Image will be saved as PNG file if encoderSettings is not null and encoderSettings is an instance of type Vintasoft.WpfTwain.ImageEncoders.TwainPngEncoderSettings.

Image will be saved as TIFF file if encoderSettings is not null and encoderSettings is an instance of type Vintasoft.WpfTwain.ImageEncoders.TwainTiffEncoderSettings.
Example
Please see example here.
Requirements

Target Platforms: Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

See Also

Reference

AcquiredImage Class
AcquiredImage Members
Overload List
SaveToStream Method