如何将一个PNG图像加载到另一个图像上并保持透明度 [英] How to load one PNG image on top of another one and keep transparency

查看:87
本文介绍了如何将一个PNG图像加载到另一个图像上并保持透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我是C ++的新手,但我需要在对话框中加载一些图像.
问题是图像是PNG格式.我找到了这个示例,并且能够加载背景图片http://www.ucancode.net/CPP_Library_Control_Tool/Load-Display-png-image-file-mfc-sample-code.htm.但是现在我需要在顶部加载另一个图像并保持透明度.
请帮忙.
在此先感谢您.

Hello,
I am new in C++, but I need to load some images on my dialog.
The problem is, that images is PNG format. I found this example, and able to load background image http://www.ucancode.net/CPP_Library_Control_Tool/Load-Display-png-image-file-mfc-sample-code.htm . But now I need to load another image on top and keep transparency.
Please help.
Thanks in advance.

推荐答案

您可以保存两个CImage
实例. ( http://msdn.microsoft.com/en-us/library/5eb252d0( VS.80).aspx [
You could hold two instances of CImage
( http://msdn.microsoft.com/en-us/library/5eb252d0(VS.80).aspx[^] )
and then use its Load(..) and Draw(..) methods... :)


这篇关于如何将一个PNG图像加载到另一个图像上并保持透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆