ALT-TAB应用程序图标像素化 [英] ALT-TAB Application Icon Pixelated

查看:133
本文介绍了ALT-TAB应用程序图标像素化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的应用程序的子窗口打开并且我查看 ALT + TAB 菜单时,应用程序图标看起来像素化。我假设Windows使用低分辨率版本的图标(我认为是16x16像素)。我能做什么,Windows选择正确的32x32像素版本?

When a child window of my application is opened and I view the ALT+TAB menu, the application icon looks pixellated. I assume that Windows uses a low resolution version of the icon (16x16 pixel I think). What can I do that Windows selects the right version which would be 32x32 pixel?

我为有问题的窗口分配了一个图标,该图标有16x16,24x24,32x32,48x38和256x256真彩色。请注意VS在保护中说使用32x32并且它适用于我的应用程序的主窗口,我指定了相同的图标。

I assigned an icon to the window in question that has 16x16, 24x24, 32x32, 48x38 and 256x256 in true color. Please note that VS says in the proterties that 32x32 is used and that it works fine for the main window of my application where I assigned the exact same icon.

推荐答案

Windows应用程序窗口的标题栏以16x16像素显示图标。但是,Alt-Tab列表显示32x32像素的图标。它使用与为窗口设置的相同的图标。如果你只设置一个32x32,标题栏必须缩小它,这看起来很丑,因为它使用最近邻插值。那么如何支持两者?

The caption bar of a Windows application window display icons in 16x16 pixels. The Alt-Tab list, however, shows icons in 32x32 pixels. It uses the same icon as is set for the window. If you only set a 32x32 one, the caption bar has to scale it down, which tends to look ugly as it uses nearest-neighbor interpolation. So how does one support both?

答案是 ICO 文件!它支持在一个文件中嵌入多个图标,通常是各种尺寸的相同(或类似)图标,不太常见的是颜色格式。

The answer is the ICO file! It supports embedding multiple icons in one file, typically the same (or similar) icon in various sizes and, less commonly, color formats.

浏览器,Windows和其他文件是通常设计为在给定的ICO文件中巧妙地使用适当大小的变体。所以答案是在内部放置一个尺寸(或更大)的ICO文件。结果是标题栏正确使用16x16版本,而Alt-Tab使用较大的32x32版本。

Browsers, Windows, and others are typically designed to smartly use the appropriately sized variant within a given ICO file. So the answer is to have an ICO file with both sizes (or more) inside. The result is that the caption bar correctly uses the 16x16 version and Alt-Tab uses the larger 32x32 one.

保存带有多个图标的ICO文件的方法不同于程序编程。但是, GIMP 可以轻松完成(并且它是免费的)。诀窍是将各种大小的图标作为单独的图层。当您将其另存为ICO文件时,GIMP将提示您设置每个图层的大小和颜色格式。可以阅读带有图像的好教程这里

The methods for saving an ICO file with multiple icons inside varies from program to program. However, GIMP can easily do it (and it's free). The trick is to have your variously-sized icons as separate layers. When you go to save it as an ICO file, GIMP will prompt you with the ability to set the size and color format of each layer. A good tutorial, with images, can be read here.

如果有人有任何关于在其他程序中创建多图标ICO文件的链接或建议,请随时添加它们。另外,我不确定Visual Studio内置图像编辑器是否可以执行此操作—我很少打扰它。

If anyone has any links or suggestions for creating multi-icon ICO files in other programs, feel free to add them. Also, I'm unsure if the Visual Studio built-in image editor can do it or not — I've rarely bothered with it.

这篇关于ALT-TAB应用程序图标像素化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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