Image Rendering
[The feature associated with this page, DrawDib, is a legacy feature. It has been superseded by MediaComposition class. MediaComposition class has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaComposition class instead of DrawDib, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
After you call DrawDibOpen to create a DrawDib DC (see DrawDib Operations), you can draw a DIB to the screen by using the DrawDibDraw function. DrawDibDraw dithers true-color bitmaps when displaying them with 8-bit display adapters.
DrawDibDraw also supports video compressors transparently when displaying compressed bitmaps. You can access the buffer that contains the decompressed image by using the DrawDibGetBuffer function. DrawDibGetBuffer returns NULL when drawing an uncompressed bitmap. You should prepare your application to handle compressed and uncompressed bitmaps.
You can refresh an image or a portion of an image displayed by your application by using the DrawDibUpdate macro.
Related topics