SE_rasterattr_set_compression_type |
Sets the compression type
LONG SE_rasterattr_set_compression_type (SE_RASTERATTR handle, SE_COMPRESSION_TYPE type);
handle | The raster attribute handle |
type | The compression type |
SE_rasterattr_set_compression_type sets the compression type.
The available compression types are:
SE_COMPRESSION_NONEThe image will not be compressed.
SE_COMPRESSION_LZ77The image will be compressed using the LZ77 compression
algorithm.
SE_COMPRESSION_JPEGThe image will be compressed using the JPEG compression
algorithm.
SE_COMPRESSION_JP2The image will be compressed using the JPEG 2000 compression
algorithm.
Normally, the compression is set by including the SE_RASTERATTR raster attribute object and the compression type enumerator as arguments. The LZ77 compression type would be set as follows:
returncode = SE_rasterattr_set_compression_type(rasterattr,SE_COMPRESSION_LZ77);
The JPEG and JPEG2000 quality can be set with the SE_rasterattr_set_compression_property function.
If a colormap is stored with the image, then only the LZ77 compression type is allowed.
JPEG compression can only be applied to rasters that have an 8-bit pixel depth and no colormap.
SE_SUCCESS
SE_INVALID_RASTERATTR_OBJECT
SE_OPERATION_NOT_ALLOWED