ICAP_JPEGQUALITY

Featured Clients

Sectors: FinanceInformation TechnoloyGovernmentHealthcareIndustriesEducation(show all)

TWAIN Capability: ICAP_JPEGQUALITY

ICAP_JPEGQUALITY

Description

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.

TWJQ_UNKNOWN is a read-only value (MSG_GET or MSG_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 MSG_SET.

MSG_GET, MSG_GETCURRENT and MSG_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 MSG_GET after a MSG_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.

Values

Type: TW_INT

Value after MSG_OPENDS: (may be remembered from a previous session)

After MSG_RESET/MSG_RESETALL: (selected by the data source writer)

Allowed Values: TWJQ_UNKNOWN TWJQ_LOW TWJQ_MEDIUM TWJQ_HIGH

Containers

MSG_GET TW_ONEVALUE TW_RANGE TW_ENUMERATION

MSG_GETCURRENT TW_ONEVALUE

MSG_GETDEFAULT TW_ONEVALUE

MSG_SET TW_ONEVALUE

MSG_SETCONSTRAINT TW_ONEVALUE

TW_RANGE TW_ENUMERATION

MSG_RESET TW_ONEVALUE

MSG_QUERYSUPPORT TW_ONEVALUE

Required By

When the ICAP_COMPRESSION value is TWCP_JPEG.

TWAIN Version Introduced

Version 1.9

Related

ICAP_COMPRESSION ICAP_JPEGSUBSAMPLING

TWAIN Notice

Where would you like to scan from? Scan in Web Apps Scan in Java Scan in .NET