Mobile app version of vmapp.org
Login or Join
Connie430

: Multi-sized ico from different pngs (The next level from Creating an .ico file with multiple sizes - web application) How can I combine multiple pngs of different sizes into a single ico? I

@Connie430

Posted in: #Favicon

(The next level from Creating an .ico file with multiple sizes - web application)

How can I combine multiple pngs of different sizes into a single ico? I want the 256x256 and 128x128 versions to look the same, but 32x32 and 64x64 to be from a different file. How can I do this on a mac?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Connie430

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo857

This is actually very easy to do with ImageMagick.

I recently wrote a little utility faviconbuild which I have released on github under the MIT Open Source license.

This is a link to the shell script I wrote for Unix / Mac (and Windows if you use Cygwin). I also provide a bat file for anyone on Windows. I would like to encourage anyone to contribute to the project as well, including feature requests. You can read more about it on the project page and I have also included a link to download the ImageMagick binaries I was using during development.

There is a subroutine named createIcon where I do the work, but here is a short example of using ImageMagick directly to package different source files into a .ico file.

convert "image1.png" "image2.png" "image3.png" "result.ico"


The website also has some other usage examples such as the one found here.

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


This does the work of resizing an image and creating an icon with one line of script (or multiline with the character at the end of the line). Obviously this one liner doesn't give you the option to pick and choose the source image per size though.

I have also published a blog post on the development that serves as a mini tutorial for batch/bash for those interested.

10% popularity Vote Up Vote Down


 

@Sue6373160

When I tried doing this, I got some cryptic error message when trying to save as PNG… anyway, I eventually did this:
regx.dgswa.com/html/Gimp+ico+how+to


Open your image in Gimp
Make your canvas square
Resize your layer to the image
Scale the layer to the largest size in your .ico file like 64 pixels
Duplicate the layer
Scale the duplicate layer to the next size
Keep duplicating / scaling for all the sizes you want in your .ico file
Save as .ico

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme