cranderveldt
cranderveldt

Reputation: 129

How do you combine multiple (different) images into a single favicon?

There are lots of services that will take an image and create every size of web icon out of it by downscaling it to the appropriate resolutions.

However, I have designed two favicons specifically for their resolution (16x16 and 32x32), which means I have two separate, different pngs. I would love to combine these icons into one favicon.ico so I can serve that file properly. Anyone know how one could accomplish this?

Upvotes: 3

Views: 2029

Answers (2)

Shaw
Shaw

Reputation: 168

An older site, but this is the only online service I've found in 2022 which allows you to upload files for specific sizes, then merge them into an ICO:

https://www.xiconeditor.com/

Supports 64x64, 32x32, 24x24 and 16x16

Upvotes: -1

philippe_b
philippe_b

Reputation: 41446

You can use 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) works in a similar way. Beware, it produces larger ICO when the embedded PNGs are large (which is usually not the case).

Microsoft development tools (think Visual Studio) probably come with ICO edition tools, but I'm not in this stuff.

Upvotes: 7

Related Questions