Sectors: Finance • Information Technoloy • Government • Healthcare • Industries • Education • (show all)
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.
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
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
When the ICAP_COMPRESSION value is TWCP_JPEG.
Version 1.9
ICAP_COMPRESSION ICAP_JPEGSUBSAMPLING
TWAIN NoticeWhere would you like to scan from? Scan in Web Apps Scan in Java Scan in .NET
The TWAIN Toolkit is distributed as is. The developer and distributors of the TWAIN Toolkit expressly disclaim all implied, express or statutory warranties including, without limitation, the implied warranties of merchantability, noninfringement of third party rights and fitness for a particular purpose. Neither the developers nor the distributors will be liable for damages, whether direct, indirect, special, incidental, or consequential, as a result of the reproduction, modification, distribution or other use of the TWAIN Toolkit.