O'Reilly logo

Windows Graphics Programming Win32 GDI and DirectDraw® by Feng Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Image Processing Using Windows Bitmaps

The benefit of device-independent bitmaps and DIB sections is that applications can directly access their pixel arrays and color tables. Often this direct access is a critical technique to implement features not provided by GDI, or to achieve improved performance not feasible using GDI calls.

So far, we have seen both cases. When we talked about simulating PlgBlt, we used GDI's pixel access API GetPixel and SetPixel. We found out that it's much slower than GDI's Windows 2000 implementation. Each individual GetPixel and SetPixel call has the overhead of parameter validation, user-mode to kernel-mode switching, color translation, etc. GetPixel even creates a temporary bitmap to call the internal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required