SE_rasterattr_set_compression_type

Sets the compression type

Usage syntax

LONG SE_rasterattr_set_compression_type (SE_RASTERATTR handle, SE_COMPRESSION_TYPE type);

Parameters
handle The raster attribute handle
type The compression type
Description

SE_rasterattr_set_compression_type sets the compression type.

The available compression types are:

SE_COMPRESSION_NONE—The image will not be compressed.
SE_COMPRESSION_LZ77—The image will be compressed using the LZ77 compression algorithm.
SE_COMPRESSION_JPEG—The image will be compressed using the JPEG compression algorithm.
SE_COMPRESSION_JP2—The 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.

Returns

SE_SUCCESS
SE_INVALID_RASTERATTR_OBJECT

SE_OPERATION_NOT_ALLOWED