本文介绍了如何添加PNG资源在Visual Studio 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个PNG(即COM pressed图像),我想在我的组件(如应用程序),包括。
怎么办呢?
信息:
我尝试添加一个PNG资源,我的程序集在Visual Studio 2010中:
但没有奏效,因为Visual Studio的将其转换为一个uncom pressed位图:
除非我想添加一个PNG。
否则我1MB应用程序变得8MB :
] === 1MB的文件大小==>
] === 8MB文件大小==============================================================================================================================================>
解决方案
- 转到项目菜单 - >属性。
- 选择资源标签
- 确保图像首先选择。
- 单击箭头旁边的添加资源
- 选择添加现有文件
- 找到的PNG
I have a PNG (i.e. a compressed image) that I'd like to include in my assembly (i.e. application).
How to do it?
Additional information:
I tried adding a PNG resource to my assembly in Visual Studio 2010:
But that didn't work, as Visual Studio converts it to an uncompressed bitmap:
Except I want to add a PNG.
Otherwise my 1MB application becomes 8MB:
]=== 1MB file size ==>
]=== 8MB file size ==============================================================================================================================================>
解决方案
- Go to the project menu -> properties.
- Select the resources tab
- Make sure Images is selected first.
- Click the arrow beside 'add resource'
- Select add existing file
- Find the PNG
这篇关于如何添加PNG资源在Visual Studio 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!