SetPageTypeCompressionOpts Method

Example-VB Example-VC++

Sets all compression options, based on the input Image type.

Available With

Ö Imaging for Windows Professional Edition V1.0, V1.1, and V2.0
Ö Imaging for Windows 98
Imaging for Windows 95
Imaging for Windows NT 4.0

Note: The ImageType, CompType and CompInfo parameters are ignored unless the CompPreference parameter 3 (Custom) is chosen. Each parameter, however, must have a value set.

Applies To

Image Scan control

Syntax

object.SetPageTypeCompressionOpts CompPreference,ImageType,CompType,CompInfo

Arguments

CompPreferenceConstants (Integer)

Constant Setting Description

BestDisplay 0 (default) Best display quality
GoodDisplay 1 Good display quality, small file size
SmallestFile 2 Smallest file size
CustomSettings 3 Custom settings

ImageTypeConstants (Integer)

Constant Setting Description

BlackAndWhite1Bit 1 Black and white
Gray4Bit 2 16 shades of gray
Gray8Bit 3 256 shades of gray
ColorPal8Bit 4 256 colors
TrueColor24bitRGB 5 True color (RGB 24 bit)
ColorPal4Bit 6 16 Colors

CompTypeConstants (Integer)

Constant Setting Description

Uncompressed 0 uncompressed
CCITTGroup31D 1 CCITT Group 3 1D
CCITTGroup42D 2 CCITT Group 4 2D
TIFFPackbits 4 TIFF Packbits
JPEGCompression 8 JPEG
LZWCompression 21 LZW

CompInfoConstants (Integer)

Constant Setting Description

NoCompInfo 0 No compression information
G31DModifiedHuffman 4096 Group 3 1D Modified Huffman
G31DModifiedHuffmanRBO 0 Group 3 1D Modified Huffman with reversed bit order
G31DFax 6400 Group 3 1D Fax
G31DFaxRBO 2304 Group 3 1D Fax with reversed bit order
G42DFax 4608 Group 4 2D Fax
G42DFaxRBO 512 Group 4 2D Fax with reversed bit order
TIFFPackbitsInfo 0 TIFF Packbits (no compression information)
LZWInfo 0 LZW (no compression information)
JPEGLowLow 11610 JPEG low resolution, low compression
JPEGLowMed 7740 JPEG low resolution, medium compression
JPEGLowHigh 3870 JPEG low resolution, high compression
JPEGMedLow 27994 JPEG medium resolution, low compression
JPEGMedMed 24124 JPEG medium resolution, medium compression
JPEGMedHigh 20254 JPEG medium resolution, high compression
JPEGHighLow -21158 JPEG high resolution, low compression
JPEGHighMed -25028 JPEG high resolution, medium compression
JPEGHighHigh -28898 JPEG high resolution, high compression

Remarks

An error occurs when

the Compression Preference is invalid.

the Image Type is invalid.

the Compression Type does not match the Image Type.

the Compression Info does not match the Compression Type.

The relationship between Image Types, Compression Types, and Compression Info is shown below.

Black and White

Uncompressed

No compression information

CCITT Group 3 1D

Group 3 1D Modified Huffman
Group 3 1D Modified Huffman with reversed bit order
Group 3 1D Fax
Group 3 1D Fax with reversed bit order

TIFF Packbits

TIFF Packbits (no compression information)


16 Shades of Gray

Uncompressed

No compression information

LZW (Professional Edition only)

LZW (no compression information)


256 Shades of Gray

Uncompressed

No compression information

LZW (Professional Edition only)

LZW (no compression information)

JPEG
JPEG Low resolution, Low compression
JPEG Low resolution, Medium compression
JPEG Low resolution, High compression
JPEG Medium resolution, Low compression
JPEG Medium resolution, Medium compression
JPEG Medium resolution, High compression
JPEG High resolution, Low compression
JPEG High resolution, Medium compression
JPEG High resolution, High compression

256 Colors

Uncompressed

No compression information

LZW (Professional Edition only)

LZW (no compression information)


True Color (RGB 24-bit)

Uncompressed

No compression information

LZW (Professional Edition only)

LZW (no compression information)

JPEG
JPEG Low resolution, Low compression
JPEG Low resolution, Medium compression
JPEG Low resolution, High compression
JPEG Medium resolution, Low compression
JPEG Medium resolution, Medium compression
JPEG Medium resolution, High compression
JPEG High resolution, Low compression
JPEG High resolution, Medium compression
JPEG High resolution, High compression

16 Colors

Uncompressed

No compression information

LZW (Professional Edition only)

LZW (no compression information)