为工具栏图像条创建 32bpp BMP 文件?

发布于 2024-09-07 04:47:58 字数 481 浏览 3 评论 0原文

我在 Paint.NET 中创建了一个 16 像素高的图像,我想在 Visual Studio 工具栏中使用它。

我的图像是一个具有多层的 .PDN 文件。 Visual Studio 需要 32bpp BMP 文件。如何将 .PDN 文件转换为正确格式的 .BMP 文件?

我不希望这种情况发生在我的程序中。

我很高兴每当对 .PDN 文件进行更改时都必须手动执行某些操作,尽管我更喜欢可以与我的自动构建集成的东西。

我尝试过使用 Paint.NET 的 BmpX 扩展,但它将背景保存为白色,而不是透明。我尝试过使用 ImageMagick 的转换实用程序,但保存的 BMP 文件有问题,VS 显示它略有损坏,并且向右偏移了几个像素。

注意:我通过从 Paint.NET 将其保存为 .PNG 文件来使用 Convert.exe,然后使用 convert strip.png strip.bmp。不过,透明度是正确的。

I've got a 16 pixel high image that I've created in Paint.NET that I'd like to use in a Visual Studio toolbar.

My image is a .PDN file with multiple layers. Visual Studio requires a 32bpp BMP file. How do I convert the .PDN file to the correct format .BMP file?

I'm not looking to have this happen in my program.

I'm cool with having to do something manually whenever a change is made to the .PDN file, although I'd prefer something I can integrate with my automated build.

I've tried using the BmpX extension to Paint.NET, but it saves the background as white, rather than transparent. I've tried using ImageMagick's convert utility, but something's wrong with the saved BMP file, and VS displays it slightly corrupted and offset to the right by a couple of pixels.

Note: I'm using convert.exe by saving from Paint.NET as a .PNG file and then using convert strip.png strip.bmp. The transparency's correct, though.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疾风者 2024-09-14 04:47:58

事实证明,VS2010 可以处理 . PNG 文件

It turns out that VS2010 can cope with .PNG files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文