如何制作/获取多尺寸 .ico 文件?

发布于 2024-10-06 04:58:50 字数 1806 浏览 0 评论 0原文

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

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

发布评论

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

评论(7

神仙妹妹 2024-10-13 04:58:50

这可以使用 GIMP 免费完成。

它使用 GIMP 的功能使每个层具有不同的大小。

我创建了以下尺寸正确的图层。

  • 256x256 将另存为 32bpp 8bit alpha
  • 为 32bpp 8bit alpha
  • 48x48 将另存
  • 48x48将另存为 8bpp 1bit alpha 32x32 将另存为 32bpp 8bit
  • alpha 32x32 将另存为 8bpp 1bit alpha
  • 32x32 将另存为 4bpp 1bit alpha
  • 16x 16 会保存为 32bpp 8bit alpha
  • 16x16 将保存为 8bpp 1bit alpha
  • 16x16 将保存为 4bpp 1bit alpha

注意

  • 您可能需要检查其他资源以确认这是一个合理的分辨率和颜色深度列表。
  • 确保在图像外部使用透明度,并使用抗锯齿边缘。您应该看到图层外部周围的灰色棋盘效果,表明它们是透明的。
  • 16x16 图标需要使用 1 像素宽的铅笔和吸管工具进行大量手动编辑,以使它们看起来不错。
  • 不要更改 GIMP 中的颜色深度/模式。保留为 RGB
  • 当您保存为 .ico 时,您可以更改颜色深度 - GIMP 会弹出一个特殊的对话框,用于更改每个图层的颜色设置

This can be done for free using GIMP.

It uses the ability of GIMP to have each layer a different size.

I created the following layers sized correctly.

  • 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

Notes

  • 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
审判长 2024-10-13 04:58:50

ImageMagick,免费开源的图像处理工具包,可以轻松做到这一点:

注意:从 ImageMagick 7 开始,CLI 略有变化,您需要在前面添加 magick任何命令。

magick convert icon-16.png icon-32.png icon-64.png icon-128.png icon.ico

另请参阅http://www.imagemagick.org/Usage/thumbnails/#favicon ,有这样的例子:

magick convert image.png -bordercolor white -border 0 \
          \( -clone 0 -resize 16x16 \) \
          \( -clone 0 -resize 32x32 \) \
          \( -clone 0 -resize 48x48 \) \
          \( -clone 0 -resize 64x64 \) \
          -delete 0 -alpha off -colors 256 favicon.ico

现在还有更短的:

magick convert image.png -define icon:auto-resize="256,128,96,64,48,32,16" favicon.ico

ImageMagick, the free and open source image manipulation toolkit, can easily do this:

Note: Since ImageMagick 7, the CLI has changed slightly, you need to add magick in front of any commands.

magick convert icon-16.png icon-32.png icon-64.png icon-128.png icon.ico

See also http://www.imagemagick.org/Usage/thumbnails/#favicon, that has the example:

magick convert image.png -bordercolor white -border 0 \
          \( -clone 0 -resize 16x16 \) \
          \( -clone 0 -resize 32x32 \) \
          \( -clone 0 -resize 48x48 \) \
          \( -clone 0 -resize 64x64 \) \
          -delete 0 -alpha off -colors 256 favicon.ico

There is also now the shorter:

magick convert image.png -define icon:auto-resize="256,128,96,64,48,32,16" favicon.ico
痴骨ら 2024-10-13 04:58:50

优秀的(免费试用)IcoFX 允许您创建和编辑图标,包括高达 256x256 的多种尺寸、PNG 压缩和透明度。我强烈推荐它而不是大多数替代品。

在此处获取副本:http://icofx.ro/ 。它支持 Windows XP 及以上版本。

Windows 会根据文件的显示位置自动从文件中选择正确的图标。
有关图标设计和应包含的大小/位深度的详细信息,请参阅以下参考资料:

The excellent (free trial) IcoFX allows you to create and edit icons, including multiple sizes up to 256x256, PNG compression, and transparency. I highly recommend it over most of the alternates.

Get your copy here: http://icofx.ro/ . It supports Windows XP onwards.

Windows automatically chooses the proper icon from the file, depending on where it is to be displayed.
For more information on icon design and the sizes/bit depths you should include, see these references:

南笙 2024-10-13 04:58:50

“@icon sushi”是一个便携式实用程序,可以免费创建多个图标 ico 文件。

拖放放下不同大小的图标,将其全部选中,然后选择文件 ->创建多个图标。

您可以从 http://www.towofu.net/soft/e-aicon.php 下载。 php

'@icon sushi' is a portable utility that can create multiple icon ico file for free.

Drag & drop the different icon sizes, select them all and choose file -> create multiple icon.

You can download if from http://www.towofu.net/soft/e-aicon.php

别把无礼当个性 2024-10-13 04:58:50

我所做的是准备一个 512x512 PNG,Alpha 通道适合圆角或阴影,然后我将其上传到此网站 http ://convertico.com/,然后它免费返回给我一个 6 种尺寸的 .ico 文件,尺寸为 256x256、128x128、64x64、48x48、32x32 和 16x16。

What i do is to prepare a 512x512 PNG, the Alpha Channel is good for rounded corners or drop shadows, then I upload it to this site http://convertico.com/, and for free then it returns me a 6 sizes .ico file with 256x256, 128x128, 64x64, 48x48, 32x32 and 16x16 sizes.

世界和平 2024-10-13 04:58:50

Visual Studio资源编辑器(VS 2013社区版免费)可以导入PNG(和其他格式)并导出ICO。

Visual Studio Resource Editor (free as VS 2013 Community edition) can import PNG (and other formats) and export ICO.

绝影如岚 2024-10-13 04:58:50

我发现了一个名为 ICOBundle 的 Mac OSX 应用程序,它允许您轻松地将不同大小的 ico 文件拖放到 ICOBundle.app 上,提示您输入文件夹目标和文件名,并创建多图标 .ico 文件。

现在如果只能将动画 gif 版本混合到该文件中,这将是一个完整的图标集,遗憾的是不可能,并且需要单独的文件和代码片段。

I found an app for Mac OSX called ICOBundle that allows you to easily drop a selection of ico files in different sizes onto the ICOBundle.app, prompts you for a folder destination and file name, and it creates the multi-icon .ico file.

Now if it were only possible to mix-in an animated gif version into that one file it'd be a complete icon set, sadly not possible and requires a separate file and code snippet.

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