Jump to content

MCI_GETIMAGEPALETTE

From EDM2


This message returns the current palette or color map for the currently captured image, if one is available.

Syntax

param1
ULONG ulParam1; /* Flags for palette retrieval. */

param2
PMCI_PALETTE_PARMS pParam2; /* Pointer to the MCI_PALETTE_PARMS data structure. */

Parameters

ulParam1 (ULONG) - input
This parameter can contain any of the following flags:
  • MCI_NOTIFY A notification message will be posted to the window specified in the hwndCallback field.
  • MCI_WAIT Control is not returned until the action is completed.
  • MCI_FIND_BEST_REGISTERED Selects the best palette from registered color maps and returns its ID in the usRegisteredMap field of the data structure.
  • MCI_QUERY_REGISTERED_MAP Returns the palette specified in usRegisteredMap into the array specified in pPalette. The number of entries is returned in ulPalEntries.
  • MCI_QUERY_REGISTERED_MAP_SIZE Returns the size of the palette specified in usRegisteredMap into the ulPalEntries field. Use this to determine the required array size for MCI_QUERY_REGISTERED_MAP.
pParam2 (PMCI_PALETTE_PARMS) - input
A pointer to the MCI_PALETTE_PARMS data structure.

Returns

rc (ULONG) - returns
Return codes indicating success or failure:
  • MCIERR_SUCCESS Command completed successfully.
  • MCIERR_INVALID_DEVICE_ID The device ID is not valid.
  • MCIERR_DEVICE_LOCKED The device is acquired for exclusive use.
  • MCIERR_INVALID_FLAG A flag in ulParam1 is invalid.
  • MCIERR_FLAGS_NOT_COMPATIBLE Specified flags cannot be used together.
  • MCIERR_INVALID_CALLBACK_HANDLE The callback handle is incorrect.

Remarks

This command is optional for digital video devices. To verify support, use the MCI_GETDEVCAPS query.

On dual-layer image capture hardware, the image layer content is assumed. For some hardware (specifically single-plane devices), the palette computation may be based only on visible data.

Related Messages