IWICBitmapFlipRotator::Initialize method
Initializes the bitmap flip rotator with the provided parameters.
Syntax
HRESULT Initialize( [in] IWICBitmapSource *pISource, [in] WICBitmapTransformOptions options );
Parameters
- pISource [in]
-
Type: IWICBitmapSource*
The input bitmap source.
- options [in]
-
Type: WICBitmapTransformOptions
The WICBitmapTransformOptions to flip or rotate the image.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Examples
HRESULT FlipRotateSource(IWICBitmapSource *pBitmapSource, WICBitmapTransformOptions options, IWICBitmapFlipRotator **ppFlipRotator)
{
HRESULT hr = E_INVALIDARG;
if (pBitmapSource)
{
IWICImagingFactory *pFactory = NULL;
IWICBitmapFlipRotator *pFlipRotator = NULL;
HRESULT hr = CoCreateInstance(
CLSID_WICImagingFactory,
NULL,
CLSCTX_INPROC_SERVER,
IID_IWICImagingFactory,
(LPVOID*)&pFactory
);
if (SUCCEEDED(hr))
{
hr = pFactory->CreateBitmapFlipRotator(&pFlipRotator);
}
if (SUCCEEDED(hr))
{
hr = pFlipRotator->Initialize(pBitmapSource, options);
}
if (SUCCEEDED(hr))
{
*ppFlipRotator = pFlipRotator;
}
if (pFlipRotator)
{
pFlipRotator->Release();
}
if (pFactory)
{
pFactory->Release();
}
}
return hr;
}
Requirements
|
Minimum supported client |
Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
Library |
|
|
DLL |
|