CImagePalette class
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The CImagePalette
class manages palettes for video renderers. It can be used to create a logical palette from a video format. This class is intended to be used with the CBaseWindow and CDrawImage classes, so it is somewhat specialized.
Protected Member Variables | Description |
---|---|
m_hPalette | Handle to the logical palette that this object manages. |
m_pBaseWindow | Pointer to the CBaseWindow object that manages the window. |
m_pDrawImage | Pointer to the CDrawImage object that draws the video image. |
m_pFilter | Pointer to the owning filter. |
Public Methods | Description |
CImagePalette | Constructor method. |
CopyPalette | Copies the palette from any VIDEOINFO structure to any palettized VIDEOINFO structure. |
MakeIdentityPalette | Attempts to make a palette that maps directly to the palette selected in the display device. |
MakePalette | Creates a logical palette from the color table in a video format. |
PreparePalette | Sets up a palette, based on a media type from the owning filter. |
RemovePalette | Deletes the existing logical palette. |