如何将位图中的背景白边去掉,将不规则的图象导入程序中呀?

the81919 2005-04-25 10:33:50
请教各位ggjj,我现在在做个小界面,用photoshop画好了具有透明背景界面图象,但是保存为位图后背景变成白色的了不再透明了,用vc载入一看,发现总是图象不象想象中那样不规则的,总要带那些讨厌的白边,请教大虾怎么把那些白边去掉,还我个性的图形呀
...全文
192 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
the81919 2005-04-25
  • 打赏
  • 举报
回复
狼兄,谢谢啦,感激ing……
handwolf 2005-04-25
  • 打赏
  • 举报
回复

BOOL TransparentBlt(
HDC hdcDest, // handle to destination DC
int nXOriginDest, // x-coord of destination upper-left corner
int nYOriginDest, // y-coord of destination upper-left corner
int nWidthDest, // width of destination rectangle
int hHeightDest, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXOriginSrc, // x-coord of source upper-left corner
int nYOriginSrc, // y-coord of source upper-left corner
int nWidthSrc, // width of source rectangle
int nHeightSrc, // height of source rectangle
UINT crTransparent // color to make transparent
);
最后一个参数就是你要过滤的颜色,可以设成白色RGB(255,255,255),我以前就是这么做的!

具体参数用法请见msdn:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_2y9g.asp
the81919 2005-04-25
  • 打赏
  • 举报
回复
请大家多帮我upup,谢谢啦

19,468

社区成员

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

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