Visual Studio 2008资源编辑器令人讨厌PNG [英] Visual Studio 2008 resource editor is annoying with PNG's

查看:122
本文介绍了Visual Studio 2008资源编辑器令人讨厌PNG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2008中有一个资源DLL项目,其中大部分包含PNG图像.每次将新图像导入资源文件时,都会收到RC2170错误:对于资源文件中以前存在的每个PNG,位图文件不是3.0格式.

I have a resource DLL project in VS2008 that contains mostly PNG images. Every time I import a new image to the resource file, I get an RC2170 error: bitmap file is not 3.0 format, for every PNG that was previously in the resource file.

是的,在我添加新图像之前,所有这些图像都已正确完成.只有从资源文件中删除所有这些图像,然后再次导入它们(不变),它才会编译.

Thing is, all of those iamges have complied ok before I add the new image. Only after I remove all of those images from the resource file, and import them again (unchanged), it would compile.

对于每个添加的新PNG文件,此行为都会重复出现,并且随着PNG文件数量的增加,它变得越来越烦人.

This behavior repeats itself for every new PNG file added, and as the number of PNG files grows, it becomes increasingly annoying.

有人经历过类似的经历吗?有解决办法吗?

Anyone experienced anything similiar? Any solution?

顺便说一句:如果可以解决此问题,我实际上不需要资源编辑器将PNG文件识别为图像.

BTW: I don't actually need the resource editor to recognize the PNG files as images, if that may solve this.

推荐答案

根据

According to this thread, you are experience a bug in the resource editor which changes:

IDI_DENTIFIER PNG "background.png"
到:
IDI_DENTIFIER BITMAP "background.png"

IDI_DENTIFIER PNG "background.png"
to:
IDI_DENTIFIER BITMAP "background.png"

但请注意:通过LoadImage()调用时,这些PNG资源似乎未在Vista之前的操作系统上加载.使用此资源类型可能会将您的应用程序限制为Vista.

But beware: these PNG resources do not seem to load on pre-Vista OS when called via LoadImage(). Using this resource type may limit your application to Vista.

这篇关于Visual Studio 2008资源编辑器令人讨厌PNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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