QPx_DoCodecSettingsDialog
QPx_DoCodecSettingsDialog(codecType; codecType; codecType; codecType; codecType):error | |||
---|---|---|---|
![]() |
codecType | Text | Codec type |
![]() |
compQuality | Longint | Compression quality |
![]() |
compDepth | Longint | Compression depth |
![]() |
samplePict | Picture | Picture variable, optional |
![]() |
codecList | Array text | List of codec types, optional |
![]() |
error | Longint | Error result |
Display the standard compression settings dialog
Parameter codecType 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.
Parameter compQuality 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.
Parameter compDepth 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:
qpx_BlackAndWhite | 1 | Black and white |
qpx_FourColors | 2 | Four colors |
qpx_SixteenColors | 4 | Sixteen colors |
qpx_TwoHundredFiftySixColors | 8 | 256 colors |
qpx_ThousandsColors | 16 | Thousands of colors |
qpx_MillionColors | 24 | Million of colors |
qpx_MillionColorsPlusAlpha | 32 | Million of colors plus alpha |
qpx_FourGrays | 34 | Four grays |
qpx_SixteenGrays | 36 | Sixteen grays |
qpx_TwoHundredFiftySixGrays | 40 | 256 grays |
Parameter samplePict specifies a picture that will be used as a sample in the compression settings dialog. This parameter is optional.
Optional parameter codecList 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_TEXT($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 | Get the list of available codecs |