Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

ICO (.ico)


    Registered MIME type: image/vnd.microsoft.icon
    Microsoft Windows icon.
    Raster image file format.
    Native icon format on Windows.
    ICO is an acronym derived from icon.
    Binary format.
    Can store multiple icons at different color resolutions.
    Supports alpha channels.
    Similar to CUR format.

Import and ExportImport and Export

  • Import["file.ico"] imports an ICO file, returning all icons stored in the file as a list of Image objects.
  • Import["file.ico",elem] imports the specified element from an ICO file.
  • Import["file.ico",{elem,suba,subb,}] imports a subelement.
  • Import["file.ico",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","ICO"] or Import["file",{"ICO",elem,}].
  • Export["file.ico",expr,elem] creates an ICO file by treating expr as specifying element elem.
  • Export["file.ico",{expr1,expr2,},{{elem1,elem2,}}] treats each as specifying the corresponding .
  • Export["file.ico",expr,opt1->val1,] exports expr with the specified option elements taken to have the specified values.
  • Export["file.ico",{elem1->expr1,elem2->expr2,},"Rules"] uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the ICO file format.


  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"array of color values for each icon
    "GraphicsList"list of graphics objects
    "ImageList"all icons, given as a list of Image objects
    "GrayLevels"array of normalized gray-level values
    "RGBColorArray"array of RGBColor objects for each icon
  • Import by default uses the element for ICO files.
  • Advanced Import elements:
  • "BitDepth"number of bits used to represent each color channel
    "ColorSpace"color encoding used in the file
    "ImageSize"raster dimensions
  • ICO supports a maximum of 256×256 pixels images. Export will scale down Image and Graphics larger than 256 pixels to fit.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Import an ICO file that contains two bitmaps as a list of images:

Click for copyable input

Read an ICO file representing an icon at various resolutions:

Click for copyable input

Export a list of images at various resolutions to ICO:

Click for copyable input
Introduced in 2007
| Updated in 2012