How to get pixel color from pointer to bitmap

Hi! First of all, sry for my bad english =)
I have a problem...
I need to get some pixels colors from bitmap. I have pointer to bitmap:
ID2D1Bitmap*
It is inherited from IUnknown.
Standart functions cant help me with it.
Can somebody give me adwice: how to work with pixels, having only this pointer...
Thanks =)
Can't you get pixels from the source you used to create the bitmap?
Use IWICBitmap::Lock method to access raw bitmap data directly.
http://msdn.microsoft.com/en-us/library/ee690187%28v=VS.85%29.aspx

I assume if your data is backed by IWICBitmap.


If the bitmap is backed by ID3D11Texture2D you use Map:
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476457%28v=vs.85%29.aspx

If the bitmap is backed by IDXGISurface you use GetDC as usual.
Topic archived. No new replies allowed.