如何制作/获取多尺寸的.ico文件? [英] How to make/get a multi size .ico file?
问题描述
我只想拥有一个.ico文件,其中包含多个大小的图标图像。我想在跨平台桌面应用程序中使用它(因此,例如在Windows上,16x16大小用于应用程序的顶部栏,但当使用Alt-时显示各种打开的应用程序时使用32x32大小版本标签)。一旦我有了.ico文件,我知道如何在我的widget工具包中使用它来获得这个效果,但我不知道如何获得它。
I simply want to have an .ico file that has multiple sizes of the icon image contained within it. I'd like it for use in a cross-platform desktop application (so that, e.g. on Windows, the 16x16 size is used for the app's top bar but a 32x32 size version is used when the various open apps are shown when using Alt-Tab). Once I have that .ico file, I know how to use it within my widget toolkit to get this effect, but I don't know how to get it.
什么我应该使用哪个进程制作这样的文件?
What process should I use to make such a file?
推荐答案
这可以使用GIMP免费完成。
This can be done for free using GIMP.
它使用GIMP的功能使每个图层的大小不同。
It uses the ability of GIMP to have each layer a different size.
我创建了以下正确大小的图层。
I created the following layers sized correctly.
- 256x256将保存为32bpp 8bit alpha
- 48x48将保存为32bpp 8bit alpha
- 48x48将保存为8bpp 1bit alpha
- 32x32将保存为32bpp 8bit alpha
- 32x32将保存为8bpp 1bit alpha
- 32x32将保存为4bpp 1bit alpha
- 16x16将保存为32bpp 8bit alpha
- 16x16将保存为8bpp 1bit alpha
- 16x16将保存为4bpp 1bit alpha
- 256x256 will be saved as 32bpp 8bit alpha
- 48x48 will be saved as 32bpp 8bit alpha
- 48x48 will be saved as 8bpp 1bit alpha
- 32x32 will be saved as 32bpp 8bit alpha
- 32x32 will be saved as 8bpp 1bit alpha
- 32x32 will be saved as 4bpp 1bit alpha
- 16x16 will be saved as 32bpp 8bit alpha
- 16x16 will be saved as 8bpp 1bit alpha
- 16x16 will be saved as 4bpp 1bit alpha
注释
- 您可能需要检查其他资源以确认自己这是一个明智的分辨率和颜色深度列表。
- 确保在图像外部使用透明度和消除锯齿的边缘。您应该在图层外部看到灰色棋盘效果以表明它们是透明的
- 需要使用1像素宽的铅笔和吸管工具手动大量编辑16x16图标让它们看起来不错。
- 不要在GIMP中改变颜色深度/模式。保留为RGB
- 当您另存为.ico时更改颜色深度 - GIMP弹出一个特殊对话框,用于更改每个图层的颜色设置
- You may need to check other resources to confirm to yourself that this is a sensible list of resolutions and colour depths.
- Make sure you use transparency round the outside of your image, and anti-aliased edges. You should see the grey checkerboard effect round the outside of your layers to indicate they are transparent
- The 16x16 icons will need to be heavily edited by hand using a 1 pixel wide pencil and the eyedropper tool to make them look any good.
- Do not change colour depth / Mode in GIMP. Leave it as RGB
- You change the colour depths when you save as an .ico - GIMP pops up a special dialog box for changing the colour settings for each layer
这篇关于如何制作/获取多尺寸的.ico文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!