Partager via


CImagePalette::CopyPalette

 
Microsoft DirectShow 9.0

CImagePalette::CopyPalette

The CopyPalette method copies the palette from any VIDEOINFO structure to any palettized VIDEOINFO structure.

Syntax

  HRESULT CopyPalette(
    const CMediaType *pSrc,
    const CMediaType *pDest
);

Parameters

pSrc

Pointer to the source media type.

pDest

Pointer to the destination media type.

Return Value

Returns S_OK if the palette was copied. Returns S_FALSE if either the source or destination media type does not have a palette.

Remarks

The pDest media type must be a palettized format with a color depth of 8 bits or less. The pSrc media type can be any VIDEOINFOHEADER type with a palette, including YUV and true-color formats with palette entries. The method copies the palette entries from pSrc into a new palette, and attaches the new palette to pDest.

Requirements

**  Header:** Declared in Winutil.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also