【问题标题】:How do you combine multiple (different) images into a single favicon?如何将多个(不同)图像组合成一个图标?
【发布时间】:2015-09-25 04:39:33
【问题描述】:

有很多服务可以通过将图像缩小到适当的分辨率来获取图像并从中创建各种尺寸的网络图标。

但是,我专门为它们的分辨率(16x16 和 32x32)设计了两个 favicon,这意味着我有两个独立的、不同的 png。我很想将这些图标合并到一个 favicon.ico 中,这样我就可以正确地提供该文件。有谁知道如何做到这一点?

【问题讨论】:

    标签: image favicon meta


    【解决方案1】:

    您可以使用 ImageMagick:

    # For Ubuntu
    sudo apt-get install imagemagick
    
    convert favicon.ico favicon.png
    
    # Now you have several files named favicon-0.png, favicon-1.png...
    # Edit them or replace them
    
    # Merge the PNGs into a single ICO
    # Of course, list all the PNGs you need to merge
    convert favicon-0.png favicon-1.png new_favicon.ico
    

    Icotool (sudo apt-get install icoutils) 以类似的方式工作。请注意,当嵌入的 PNG 很大时(通常情况并非如此),它会产生更大的 ICO。

    Microsoft 开发工具(想想 Visual Studio)可能附带 ICO 版本工具,但我不在这方面。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-05
      • 1970-01-01
      • 1970-01-01
      • 2022-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多