如何在 Visual Studio 2010 中添加 PNG 资源? [英] How to add PNG resource in Visual Studio 2010?
本文介绍了如何在 Visual Studio 2010 中添加 PNG 资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 PNG(即压缩图像),我想将它包含在我的程序集(即应用程序)中.
I have a PNG (i.e. a compressed image) that I'd like to include in my assembly (i.e. application).
怎么做?
附加信息:
我尝试在 Visual Studio 2010 中向我的程序集添加一个 PNG 资源:
I tried adding a PNG resource to my assembly in Visual Studio 2010:
但这不起作用,因为 Visual Studio 将其转换为未压缩的位图:
But that didn't work, as Visual Studio converts it to an uncompressed bitmap:
除了我想添加一个 PNG.
Except I want to add a PNG.
]=== 1MB file size ==>
]=== 8MB file size ==============================================================================================================================================>
推荐答案
- 转到项目菜单 -> 属性.
- 选择资源标签
- 确保首先选择图像.
- 点击添加资源"旁边的箭头
- 新图像(从图像文件类型中选择)
- 查找 PNG
这篇关于如何在 Visual Studio 2010 中添加 PNG 资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文