UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:d2d1_1.ID2D1DeviceContext.CreateBitmapFromDxgiSurface(IDXGISurface,constD2D1_BITMAP_PROPERTIES1,ID2D1Bitmap1) |
ID2D1DeviceContext::CreateBitmapFromDxgiSurface (d2d1_1.h) |
Creates a bitmap from a DXGI surface that can be set as a target surface or have additional color context information specified. (overload 1/2) |
|
direct2d\id2d1devicecontext_createbitmapfromdxgisurface.htm |
Direct2D |
76d49be7-b0ac-44a7-aeaf-a7b18346a2bf |
12/05/2018 |
CreateBitmapFromDxgiSurface, CreateBitmapFromDxgiSurface method [Direct2D], CreateBitmapFromDxgiSurface method [Direct2D],ID2D1DeviceContext interface, ID2D1DeviceContext interface [Direct2D],CreateBitmapFromDxgiSurface method, ID2D1DeviceContext.CreateBitmapFromDxgiSurface, ID2D1DeviceContext::CreateBitmapFromDxgiSurface, ID2D1DeviceContext::CreateBitmapFromDxgiSurface(IDXGISurface,const D2D1_BITMAP_PROPERTIES1 &,ID2D1Bitmap1), d2d1_1/ID2D1DeviceContext::CreateBitmapFromDxgiSurface, direct2d.id2d1devicecontext_createbitmapfromdxgisurface |
d2d1_1.h |
Windows |
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps] |
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps] |
D2d1.dll |
Windows |
19H1 |
|
|
|
|
|
|
Creates a bitmap from a DXGI surface that can be set as a target surface or have additional color context information specified.
Type: IDXGISurface*
The DXGI surface from which the bitmap can be created.
Note The DXGI surface must have been created from the same Direct3D device that the Direct2D device context is associated with.
Type: const D2D1_BITMAP_PROPERTIES1*
The bitmap properties specified in addition to the surface.
Type: ID2D1Bitmap1**
When this method returns, contains the address of a pointer to a new bitmap object.
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
HRESULT | Description |
---|---|
S_OK | No error occurred. |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid value was passed to the method. |
D3DERR_OUTOFVIDEOMEMORY | Direct3D does not have enough display memory to perform the operation. |
If the bitmap properties are not specified, the following information is assumed:
- The bitmap DPI is 96.
- The pixel format matches that of the surface.
- The returned bitmap will inherit the bind flags of the DXGI surface.
- However, only the subset of flags meaningful to Direct2D will be inherited. For example, D3D10_USAGE_DYNAMIC is not compatible with any public Direct2D flags.
- The color context is unknown.
- The alpha mode of the bitmap will be premultiplied (common case) or straight (A8).
- The bitmap DPI will be specified by the bitmap properties.
- If both dpiX and dpiY are 0, the bitmap DPI will be 96.
- The pixel format must be compatible with the shader resource view or render target view of the surface.
- The bitmap options must be compatible with the bind flags of the DXGI surface. However, they may be a subset. This will influence what resource views are created by the bitmap.
- The color context information will be used from the bitmap properties, if specified.