我的 Windows 应用程序的图标应该包含哪些图标大小? [英] Which icon sizes should my Windows application's icon include?

查看:17
本文介绍了我的 Windows 应用程序的图标应该包含哪些图标大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Windows 应用程序,它可以在 Windows XP 和更新版本(即 Vista/7)中运行.根据 Vista UI 指南,标准尺寸为 16x16,32x32、48x48、256x256(XP 标准尺寸不包括 256x256 图标).除了这些尺寸之外,我还有 96x96 和 128x128(并且可以创建更多).

I have a Windows application which will run in Windows XP and newer (i.e. Vista/7). According to the Vista UI Guidelines, the standard sizes are 16x16, 32x32, 48x48, 256x256 (XP standard sizes do not include the 256x256 icon). In addition to those sizes, I also have 96x96 and 128x128 (and could create more).

我应该包含哪些图标尺寸?shell 会实际使用非标准"大小,还是只是让我的应用程序膨胀?

Which of these icon sizes should I include? Will the shell actually use the "non-standard" sizes, or will I simply bloat my application?

推荐答案

我花了一些时间仔细检查.我创建了一个图标,其图像的大小为 16、24、32、40、48、64、96、128 和 256.然后我检查了显示的是哪个图像.所有这些都是在正常的 96dpi 下完成的.如果使用更大的 DPI,可以使用更大的尺寸(在 Windows 7 中只检查了一点).结果:

I took some time to check it in detail. I created an icon whose images have sizes of 16, 24, 32, 40, 48, 64, 96, 128 and 256. Then I checked which image is shown. All these were done with normal 96dpi. If using a larger DPI, the larger sizes may be used (only checked this a bit in Windows 7). The results:

Windows XP:

  • 浏览器视图:
    • 详细信息/列表:16
    • 图标:32
    • 图块/缩略图:48

    Windows 7:

    • 浏览器视图:
      • 详细信息/列表/小符号:16
      • 所有其他选项:256(调整大小,如有必要)
      • 右键菜单:16
      • 小符号:32
      • 中号:48
      • 大符号:256 个(必要时调整大小)
      • 使用 Ctrl+鼠标滚轮缩放:16、32、48、256

      Windows 运行时:(从这里)

      • 主图块:150x150、310x150(宽版)
      • 小徽标:30x30
      • 徽章(用于锁屏):24x24,单色
      • 启动画面:620x300
      • 商店:50x50

      结果是:Windows XP 使用 16、32、48 大小的图标,而 Windows 7(可能还有 Vista)也使用 256 大小的图标.忽略所有其他中间图标大小(它们可能用在我没有检查的某些区域).

      So the result: Windows XP uses 16, 32, 48-size icons, while Windows 7 (and presumably also Vista) also uses 256-size icons. All other intermediate icon sizes are ignored (they may be used in some area which I didn't check).

      我还在 Windows 7 中检查了如果缺少图标大小会发生什么:

      I also checked in Windows 7 what happens if icon sizes are missing:

      生成缺失的尺寸(显然).对于 16、32 和 48 的大小,如果缺少一个,则首选缩小比例.因此,如果我们有大小为 16 和 48 的图标,则 32 图标是从 48 图标创建的.256 图标仅在没有其他尺寸可用的情况下用于这些!因此,如果图标尺寸为 16 和 256,则其他尺寸是从 16 图标放大的!

      The missing sizes are generated (obviously). With sizes of 16, 32, and 48, if one is missing, downscaling is preferred. So if we have icons with size 16 and 48, the 32 icon is created from the 48 icon. The 256 icon is only used for these if no other sizes are available! So if the icons are size 16 and 256, the other sizes are upscaled from the 16 icon!

      此外,如果 256 图标不存在,则使用(可能生成的)48 图标,但不再调整大小.所以我们有一个(可能很大)空白区域,中间有 48 个图标.

      Additionally, if the 256 icon is not there, the (possibly generated) 48 icon is used, but not resized anymore. So we have a (possibly large) empty area with the 48 icon in the middle.

      请注意,XP 中的默认桌面图标大小为 32x32,而在 Windows 7 中为 48x48.因此,对于 Windows 7 来说,拥有一个 48 位的图标是相对重要的.否则,它是由一个较小的图标放大的,这可能看起来很丑.

      Note that the default desktop icon size in XP was 32x32, while in Windows 7 it is 48x48. As a consequence, for Windows 7 it is relatively important to have a 48 icon. Otherwise, it is upscaled from a smaller icon, which may look quite ugly.

      关于 Windows XP 兼容性的注意事项:如果您将图标重新用作窗口图标,那么请注意,如果您使用压缩的 256 图标,这可能会使您的应用程序崩溃.解决方案是不压缩图标或创建没有(压缩)256 图标的第二个版本.请参阅此处了解更多信息.

      Just a note about Windows XP compatibility: If you reuse the icon as window icon, then note that this can crash your application if you use a compressed 256 icon. The solution is to either not compress the icon or create a second version without the (compressed) 256 icon. See here for more info.

      这篇关于我的 Windows 应用程序的图标应该包含哪些图标大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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