Class that represents a collection of capabilities (compression) supported by device.
Use JpegQuality capability as a shortcut to select JPEG quantization tables that tradeoff quality versus
compressed image size.
Used in concert with DAT_JPEGCOMPRESSION it is possible for an Application to obtain the tables that are
appropriate for varying percentages of quality within a given Source. TWJQ_UNKNOWN is a read-only value
(get or getCurrent), the Application cannot set the Source to this value. This value is reported if the
Application uses DAT_JPEGCOMPRESSION to select the quantization tables, and the Source is unable to resolve
those tables to a percentage value. The next three TWJQ_ values are intended as markers into the quality
range, and are only applicable with set method. get, getCurrent and getDefault only return values in the
range 0 - 100. If an Application wishes to map a TWJQ_ value to a corresponding value in the range 0 - 100,
then it must issue a get after a set with one of the three TWJQ_ values. No assumption is made about the
meaning of the range 0 - 99, it may be derived from the JPEG standard or it may be optimized for the Source's
device. 100, though, implies a lossless form of compression. Applications are not encouraged to use this
value since it results in poor compression, as well as a format that is not currently widely supported in
the industry.
TWJQ_UNKNOWN - read-only; must be the setting for this capability if the user sets the JPEG compression tables
using DAT_JPEGCOMPRESSION, and the Source is not able to map the selected tables to a specific percentage of quality.
TWJQ_LOW - write-only; implies low quality; the images are at the maximum compression recommended by the Source.
TWJQ_MEDIUM - write-only; implies medium quality; the images are at the balance point between good compression
and good images. This is an arbitrary setting on the part of the Source writer that is expected to best represent
their device. This is the value that Applications are most encouraged to use.
TWJQ_HIGH - write-only; implies high quality; the images display the maximum quality that produces any kind of
meaningful compression. Note that images at this setting are still considered to be lossy.
Inheritance Hierarchy
TwainScanning.CapabilityCapSetBase
TwainScanning.Capability.CapabilitySetsCompression
Namespace: TwainScanning.Capability.CapabilitySets
Assembly: TwainScanning (in TwainScanning.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax
The Compression type exposes the following members.
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetCapabilities | (Inherited from CapSetBase.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MakeCapT | (Inherited from CapSetBase.) | |
MakeCapArrT | (Inherited from CapSetBase.) | |
MakeCapReadOnlyT | (Inherited from CapSetBase.) | |
MakeCapReadOnlyArrayT | (Inherited from CapSetBase.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
BitOrderCodes |
Used for CCITT data compression only. Indicates the bit order representation of the stored
compressed codes.
ICAP_BITORDERCODES
| |
CcittKFactor |
Used for CCITT Group 3 2-dimensional compression.The ‘K’ factor indicates how often the new
compression baseline should be re-established.A value of 2 or 4 is common in facsimile
communication.A value of zero in this field will indicate an infinite K factor—the baseline is only
calculated at the beginning of the transfer.
ICAP_CCITTKFACTOR
| |
JpegPixelType |
Allows the application and Source to agree upon a common set of color descriptors that are made
available by the Source.This ICAP is only useful for JPEG-compressed buffered memory image
transfers.
ICAP_JPEGPIXELTYPE
| |
JpegQuality |
Use this capability as a shortcut to select JPEG quantization tables that tradeoff quality versus
compressed image size. Used in concert with DAT_JPEGCOMPRSSION it is possible for an
Application to obtain the tables that are appropriate for varying percentages of quality within a
given Source.
ICAP_JPEGQUALITY
| |
JpegSubSampling |
Use this capability and JpegQuality as a shortcut to select JPEG quantization.
ICAP_JPEGSUBSAMPLING
| |
Method |
Compression method for Buffered Memory Transfers and File transfers.
ICAP_COMPRESSION
| |
PixelFlavorCodes |
Sense of the pixel whose numeric value is zero (minimum data value).
ICAP_PIXELFLAVORCODES
| |
TimeFill |
Used only with CCITT data compression. Specifies the minimum number of words of
compressed codes(compressed data) to be transmitted per line.
ICAP_TIMEFILL
|
See Also