PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, May 10, 2022

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

 May 10, 2022     favicon, image, meta     No comments   

Issue

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?


Solution

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.



Answered By - philippe_b
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing