GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TwainSetCompression Method
Image compression. A member of the TwainCompression enumeration.





In This Topic
TwainSetCompression Method (GdPictureImaging)
In This Topic
Tries to set the current image compression to use by the selected twain source for file transfer mode. Since only certain file formats support compression, this capability must be negotiated after setting the desired file format with the TwainSetImageFileFormat() method.
Syntax
'Declaration
 
Public Function TwainSetCompression( _
   ByVal Compression As TwainCompression _
) As Boolean
public bool TwainSetCompression( 
   TwainCompression Compression
)
public function TwainSetCompression( 
    Compression: TwainCompression
): Boolean; 
public function TwainSetCompression( 
   Compression : TwainCompression
) : boolean;
public: bool TwainSetCompression( 
   TwainCompression Compression
) 
public:
bool TwainSetCompression( 
   TwainCompression Compression
) 

Parameters

Compression
Image compression. A member of the TwainCompression enumeration.

Return Value

True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() methods for diagnosing the error.
Remarks
Before using this method check that the TWAIN state is 4 (TWAIN_SOURCE_OPEN) To get the TWAIN state, use the TwainGetState() method.
See Also