Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.8.10
IWICLeadBitmapEncoder::GetSubFormatFriendlyName Method
See Also

Retrieves the friendly name for a sub-format.

Syntax

 
HRESULT GetSubFormatFriendlyName(      
    WICPixelFormatGUID guidPixelFormat,     UINT uSubFormatIndex,     UINT cchFriendlyName, WCHAR *pwzFriendlyName, UINT *pcchActual );

Parameters

 
guidPixelFormat
[in] The pixel format GUID that the encoder is using.
uSubFormatIndex
[in] The index into the sub-format array returned by the GetSubFormats method.
cchFriendlyName
[in] The size of the buffer for the pwzFriendlyName.
pwzFriendlyName
[in,out] A pointer that receives the friendly name for the component.
pcchActual
[out] A pointer that receives the actual length of the friendly name for the component.

Return Values

Returns S_OK if successful, or an error value otherwise.

Remarks

Use this method to get a readable string representation for  a (sub-format)/(guidPixelFormat) pair. First call IWICLeadBitmapEncoder::GetSubFormats to get an array of valid sub-formats for the particular LEAD bitmap encoder.  When calling the GetSubFormatFriendlyName method, pass the index into the sub-format array as the uSubFormatIndex argument.
 
Call the GetSubFormatFriendlyName method once to get the length of the friendly name.  Allocate the appropriately sized array.  Then call the GetSubFormatFriendlyName method again, passing the allocated array as an argument. The example illustrates this technique.

See Also

Example

For an example, refer to IWICLeadBitmapEncoder::GetSubFormats