QMedia
![]() |
QM_DoCodecSettingsDialog(codecType; codecQuality; codecDepth; samplePict; codecList):error | |||
![]() |
codecType | String4 | Codec type |
![]() |
codecQuality | Longint | Compression quality |
![]() |
codecDepth | Longint | Depth |
![]() |
samplePict | Picture | Sample pict |
![]() |
codecList | Array string | Codec list |
![]() |
error | Longint | Error result |
Opens 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 codecQuality 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 codecDepth 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
C_STRING(4;$codec) C_LONGINT($codecQuality;$codecDepth) C_PICTURE($previewPict) $codec:="jpeg" $codecQuality:=qm_NormalQuality $codecDepth:=0 GET PICTURE RESOURCE(11573;$previewPict) $err:=QM_DoCodecSettingsDialog ($codec;$codecQuality;$codecDepth;$previewPict) |
Related commands
QM_GetCodecs | Returns the list of all QuickTime codecs |