Direct2D中的IWICBitmap接口
来源:互联网 发布:翁虹 三级 知乎 编辑:程序博客网 时间:2024/06/10 03:10
Direct2D中的IWICBitmap接口
IWICBitmap
Provides access to a rectangular area of the bitmap.
IWICImagingFactory *pFactory = NULL; IWICBitmap *pBitmap = NULL; UINT uiWidth = 640; UINT uiHeight = 480; WICPixelFormatGUID formatGUID = GUID_WICPixelFormat32bppBGRA; WICRect rcLock = { 0, 0, uiWidth, uiHeight }; IWICBitmapLock *pLock = NULL; HRESULT hr = CoCreateInstance( CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IWICImagingFactory, (LPVOID*)&pFactory ); if (SUCCEEDED(hr)) { hr = pFactory->CreateBitmap(uiWidth, uiHeight, formatGUID, WICBitmapCacheOnDemand, &pBitmap); } if (SUCCEEDED(hr)) { hr = pBitmap->Lock(&rcLock, WICBitmapLockWrite, &pLock); if (SUCCEEDED(hr)) { UINT cbBufferSize = 0; UINT cbStride = 0; BYTE *pv = NULL; hr = pLock->GetStride(&cbStride); if (SUCCEEDED(hr)) { hr = pLock->GetDataPointer(&cbBufferSize, &pv); } // Clear the image data ZeroMemory(pv, cbBufferSize); // Release the bitmap lock. pLock->Release(); } } if (pBitmap) { pBitmap->Release(); } if (pFactory) { pFactory->Release(); } return hr;
- Direct2D中的IWICBitmap接口
- Direct2D中的坐标变换
- Direct2D中的坐标变换
- Direct2D中的坐标变换
- Direct2D中的DirectWrite
- Direct2D中的2D显示
- Direct2D在VC中的使用
- [Direct2D]DX11中的2D显示
- Direct2D教程(二)来看D2D世界中的Hello,World
- Direct2D 及 WPF手动绘图中的线宽问题
- Direct2D教程(二)来看D2D世界中的Hello,World
- Direct2D 1.1
- Direct2D入门
- Direct2D 几何图形
- Direct2D 变换
- Direct2D入门
- Introducing Direct2D
- Direct2D QuickStart
- Direct2d , WICBITMAP
- Direct2d effects
- CSS3伪元素Before和After应用介绍
- ubuntu 下载软件仓库信息失败,请检查网络链接
- 杭电2072
- Direct2D中的IWICBitmap接口
- WinRT使用direct2d自由旋转图片
- ScrollView和ListView套用冲突的解决方法
- spring 定时任务配置
- 第1章 Winsock简介
- 2012年中国软件培训机构排行榜
- iPhone developer's Cookbook -- Chapter 1 Introduction
- Direct2D draw bitmap
- 基因检测