我有一个PNG(即压缩图像),我想将其包含在我的程序集中(即应用程序)。
怎么做?
其他信息:
我尝试在Visual Studio 2010中向我的程序集添加PNG资源:
但是这不起作用,因为Visual Studio将其转换为未压缩的位图:
除了我想添加PNG。
否则my 1MB application becomes 8MB:
]=== 1MB file size ==>
]=== 8MB file size ==============================================================================================================================================>
答案 0 :(得分:28)
答案 1 :(得分:1)
我能做到这一点的唯一方法是从PNG中删除文件扩展名。这样,Visual Studio就无法将文件识别为图像,并且不会使它们保持原状。