How to make/get a multi size .ico file? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
开发者_如何学JAVA Improve this questionI simply want to have an .ico file that has multiple sizes of the icon image contained within it. I'd like it for use in a cross-platform desktop application (so that, e.g. on Windows, the 16x16 size is used for the app's top bar but a 32x32 size version is used when the various open apps are shown when using Alt-Tab). Once I have that .ico file, I know how to use it within my widget toolkit to get this effect, but I don't know how to get it.
What process should I use to make such a file?
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
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
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:
Icons (Windows Aero)
Creating Windows XP Icons
'@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
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.
Visual Studio Resource Editor (free as VS 2013 Community edition) can import PNG (and other formats) and export ICO.
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.
- http://www.google.com/search?client=safari&rls=en&q=Mac+OSX+ICOBundle&ie=UTF-8&oe=UTF-8
- http://www.telegraphics.com.au/sw/info/icobundle.html
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.
Fresh answer 2018:
Step 1 Launch Microsoft Paint. Not Paint.Net but plain Paint
Step 2 Open the image you want to convert to icon format by clicking the “Paint” toolbar tab and selecting “Open.”
Step 3 Click the “Paint” tab, highlight the “Save As” option and select the “BMP picture” option. As 256-colored. There is a dropdown list.
Step 4 You have to open it in Paint.net now. Enter a file name for the icon and type “.ico” (without quotations) as the file extension. Select your preferred output folder for the icon and click “Save.”(still in bmp type) , exposing auto definition in saving parameters window.
This is a solution for those WHO DOESN'T WANT THE THIRD PARTY APPS TO GAIN PERMISSIONS ON THEIR COMP.
I use this simple way to create custom icons for folders on my desktop or documents.
精彩评论