I was just discussing if there was an alternative windows graphics library to GDI & Direct X in a forum. Someone mentioned WinDIB. Sadly, he didn't explain more about it.
Now I've searched google.
There seems to be no Wikipedia article on Windows DIB.
It appears that some graphics libraries such as SDL use a WinDIB backend.
So what exactly is WinDIB? Is there any documentation to it? Where can I learn more about it?
Windows Embedded CE and DirectX use the device-independent bitmap (DIB) as their native graphics file format.
A DIB is a file that contains information describing the following:
An image's dimensions,
The number of colors the image uses,
Values describing the colors used,
Data that describes each pixel.
A DIB also contains lesser-used parameters, like:
Information about file compression,
Significant colors (if all are not used),
Physical dimensions of the image (in case it will end up in print).
DIB files usually have the .bmp file extension, although they can use a .dib extension.
Because the DIB is so pervasive in Windows programming, Windows Embedded CE contains many functions you can use with DirectX.
SOURCE
http://msdn.microsoft.com/en-us/library/aa917106.aspx
DIB stands for Device Independent Bitmap. It is a Windows-specific general bitmap format. Essentially it is the format of a Windows [.bmp] file. It is very useful as an intermediate format in order to e.g. present OpenCV pictures in native Windows windows.
As an example, my ColorDib.h file, from the last few days, supports a limited subset of the DIB formats, namely palette-free RGB pictures. I have used that to display OpenCV video in a native Windows window. Actually, complete source for that is at the Bitbucket repository that the link goes to.
Microsoft does not offer very much Windows API level functionality for reading or writing BMP/DIB files. In the old days all that was there was OleLoadPicturePath
and friends, plus reusing the web browser if you liked to do in very inefficient, complex and weird ways, plus some horrid code presented in the documentation. Then came GDI+, which, although far from perfect, simplified a lot. And nowadays it’s no problem except when programming purely at the API level, where a class such as the one I linked to above comes in very handy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With