Compression ClassTerminal Works - TwainScanning.Net Library
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

SystemObject
  TwainScanning.CapabilityCapSetBase
    TwainScanning.Capability.CapabilitySetsCompression

Namespace: TwainScanning.Capability.CapabilitySets
Assembly: TwainScanning (in TwainScanning.dll) Version: 1.3.4.0 (1.3.4.0)
Syntax

public class Compression : CapSetBase

The Compression type exposes the following members.

Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCapabilities (Inherited from CapSetBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMakeCapT (Inherited from CapSetBase.)
Protected methodMakeCapArrT (Inherited from CapSetBase.)
Protected methodMakeCapReadOnlyT (Inherited from CapSetBase.)
Protected methodMakeCapReadOnlyArrayT
(Inherited from CapSetBase.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyBitOrderCodes
Used for CCITT data compression only. Indicates the bit order representation of the stored compressed codes. ICAP_BITORDERCODES
Public propertyCcittKFactor
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
Public propertyJpegPixelType
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
Public propertyJpegQuality
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
Public propertyJpegSubSampling
Use this capability and JpegQuality as a shortcut to select JPEG quantization. ICAP_JPEGSUBSAMPLING
Public propertyMethod
Compression method for Buffered Memory Transfers and File transfers. ICAP_COMPRESSION
Public propertyPixelFlavorCodes
Sense of the pixel whose numeric value is zero (minimum data value). ICAP_PIXELFLAVORCODES
Public propertyTimeFill
Used only with CCITT data compression. Specifies the minimum number of words of compressed codes(compressed data) to be transmitted per line. ICAP_TIMEFILL
Top
See Also

Reference