What is Windows DIB?

I was just discussing if there was an alternative Windows graphics library for GDI and Direct X in the forum. Someone mentioned WinDIB . Unfortunately, he no longer explained this.

Now I searched google.

  • There is no Wikipedia article on Windows DIB.

  • It appears that some graphics libraries, such as SDL, use the WinDIB backend.

So what is WinDIB ? Is there any documentation there? Where can I find out more about this?

+4
source share
3 answers

DIB means Bitmap device independent. This is the common bitmap format for Windows. In essence, this is the Windows [.bmp] file format. This is very useful as an intermediate format, for example, presenting OpenCV images in native Windows windows.

As an example, my ColorDib.h file over the past few days supports a limited subset of DIB formats, namely the palette, free RGB images. I used this to display OpenCV video in my own windows window. In fact, the full source for this is in the Bitbucket repository to which the link goes.

Microsoft does not offer many API level functions for reading or writing BMP / DIB files. In the old days, all that was there was OleLoadPicturePath and friends, as well as reusing the web browser if you liked doing very inefficient, complex, and weird ways, as well as some awful code provided in the documentation. Then came GDI +, which, although far from ideal, simplified a lot. And this is currently not a problem, except when programming at the API level, where a class such as the one I linked to it is very convenient.

+4
source

Windows Embedded CE and DirectX use device-independent bitmap (DIB) as their own image file format.

DIB is a file containing information describing the following:
Image sizes
The number of colors that the image uses
The values ​​that describe the colors used are
Data describing each pixel.

DIB also contains less used parameters, for example:
File compression information,
Significant colors (if all are not used),
Physical dimensions of the image (in case it ends with printing).

DIB files usually have a .bmp extension, although they can use a .dib extension. Because DIB is so common in Windows programming, Windows Embedded CE contains many features that you can use with DirectX.

SOURCE
http://msdn.microsoft.com/en-us/library/aa917106.aspx

+6
source

DIB - device independent bitmap. Learn more about MSDN and Wikipedia . I expect what is being said.

+1
source

Source: https://habr.com/ru/post/1399188/


All Articles