| Herd Software Development
DaVinci Graphics Library
DaVinci Documentation Home Search Order

Selecting a compression format on export

If you specify both the IPF_FILEDIALOG and IPF_COMPRESS flags when calling ipExportInd, the user will be allowed to specify their own preferred export format and, for applicable output formats, the compression specifications they would like to apply.

Preventing compression

In some cases, you may need to prevent the user from being allowed to select a compressed subformat of a particular file format. For example, if you don't want the user to export compressed TIFFs due to compatibility problems with related applications, then you can suppress compression options by not setting the IPF_COMPRESS flag.

Forcing specific compression parameters

You can only "force" specific compression parameters for formats with optional compression by disallowing the file save dialog. If you want to export files without providing a file save dialog, insure that the IPF_DILEDIALOG flag is not used, and set lpszFileName of the DAVPARAMS structure to the name of the file to be exported. Remember that when the dialog is suppressed, you as the developer must supply a filename.

JPEG formats use a lossy compression scheme with variable compression rates. You can preselect the desired JPEG output quality by using an offset to the dwFlags member of the DAVPARAMS structure representing the output quality (0x1000 for 10 percent ,0x2000 for 20 percent, 0x3000 etc. to 0x9000).

In the case of TIFF images, you can specify any of the following compression formats for output

IPF_TIFF_NOCOMP Uncompressed

IPF_TIFF_LZW Apply LZW compression (requires appropriate licensing from Unisys Corporation for LZW compression)

IPF_TIFF_CCITTRLE Apply CCITT Modified Huffman

IPF_TIFF_CCITTFAX3 Apply CCITT G3 fax Compression

IPF_TIFF_CCITTFAX4 Apply CCITT G4 fax Compression