请问GDI位图和DIB的区别?

powerthinkding 2004-05-07 10:56:05
我知道GDI位图是图形设备接口,DIB是设备无关位图,但是偶不知道本质的区别。
请高手详细指教,小弟不才,多谢!!!
...全文
166 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
FengYuanMSFT 2004-05-08
  • 打赏
  • 举报
回复
Read my book, read my book, read my book.

1) DDB is device dependent. One device may know it, another device may not know it. DIB is public format, everyone can access it.

2) DDB image data is hidden by device driver, normally stored in kernel mode, could be stored on display card. DIB is stored in user mode memory when loaded into memory.

3) DDB consumes kernel mode memory, which has low limit.

4) DDB costs on GDI handle, another GDI handle for memory.

5) DDB can be writtend to through a memory DC. GDI does not support rendering into a DIB, only from.

6) You have more formats control over DIB.

...

Do not use DDB unless you want to display the same bitmap over and over again, and performance is critical; or you want to do something special with 1-bit per pixel DDB.

19,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧