QPix Command Reference Settings Dialogs |

### QPx_DoCodecSettingsDialog

QPx_DoCodecSettingsDialog(codecType; compQuality; compDepth; samplePict; codecList):error
| codecType | String4 | Codec type
| compQuality | Longint | Compression quality
| compDepth | Longint | Compression depth
| samplePict | Picture | Picture variable, optional
| codecList | Array string | List of codec types, optional
| error | Longint | Error result

Displays the standard compression settings dialog and allows the user to set the compression parameters.

The codecType parameter specifies the codec that will be initially selected in the compression settings dialog. When the command completes, it will contain the type of the selected codec.

The compQuality parameter specifies the quality that will be initially selected in the compression settings dialog. When the command completes, it will contain the value of the quality control.

The compDepth parameter specifies the depth that will be initially selected in the compression settings dialog. A value of 0 is equivalent to the "Best depth" item of the depth popup menu. Possible values:

Black and white images | 1
Color images | 2, 8, 16, 24, 32
Grayscale images | 34 (2 bit), 36 (4-bit), 40 (8-bit)

The samplePict parameter specifies a picture that will be used as a sample in the compression settings dialog. This parameter is optional.

The optional codecList parameter can be used to restrict user selection to a specific list of codecs. If this parameter is specified, it must be a string array containing the codec types that will be presented to the user. If codecList is omitted or empty, QPix will include all available codecs.

Note: Not all codecs support all quality and depth values. If a codec does not support the specified values for quality or depth, it will automatically fall back to its respective default values.

Example

``Display the codec settings dialog, and compress` ``a picture with the specified settings` `` `C_LONGINT($error)` `C_PICTURE($picture)` `C_STRING(4;$codecType)` `C_LONGINT($quality;$depth)` `` `$picture:=[Images]Picture` `` `$error:=QPx_DoCodecSettingsDialog($codecType;$quality;$depth)` `` `If ($error=qpx_noErr)` `` `$error:=QPx_CompressPicture($picture;$codecType;$quality;$depth)` `` `If ($error#qpx_noErr)` ``Handle the error` `End if` `` `End if` ``

Related commands

QPx_GetCodecList | Returns the list of available compressors/decompressors

QPix © Escape Information Services
Generated by QDoc 2.6 on Thu, 2 May 2002 00:50:09 +0300