[Top] [Prev] [Next] [Bottom]
DFR8setcompress/d8scomp
intn DFR8setcompress(int32 type, comp_info *cinfo)
typedef union tag_comp_info
{
struct
{
intn quality;
intn force_baseline;
}
jpeg;
struct
{
int32 nt;
intn sign_ext;
intn fill_one;
intn start_bit;
intn bit_len;
}
nbit;
struct
{
intn skp_size;
}
skphuff;
struct
{
intn level;
}
deflate;
}
comp_info;
|
This union is defined to provide future expansion, but is currently only used by the COMP_JPEG compression type. A pointer to a valid comp_info union is required for all compression types other than COMP_JPEG, but the values in the union are not used. The comp_info union is declared in the header file hdf.h and is shown here for informative purposes only, it should not be re-declared in a user program.
|
|
For COMP_JPEG compression, the quality member of the jpeg structure must be set to the quality of the stored image. This number can vary from 100, the best quality, to 0, terrible quality. All images stored with COMP_JPEG compression are stored in a lossy manner, even images stored with a quality of 100. The ratio of size to perceived image quality varies from image to image, some experimentation may be required to determine an acceptable quality factor for a given application. The force_baseline parameter determines whether the quantization tables used during compression are forced to the range 0-255. It should normally be set to 1 (forcing baseline results), unless special applications require non-baseline images to be used.
|
|
If the compression type is JPEG, d8scomp defines the default JPEG compression parameters to be used. If these parameters must be changed later, the d8sjpeg routine must be used. (Refer to the Reference Manual page on d8sjpeg).
|
[Top] [Prev] [Next] [Bottom]
hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF
Development Group.