Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to make within Mathematica an image file to be used as a screen icon? Could you kindly give an example?

share|improve this question
Can you give more details? On Ubuntu I can use all kind of images for app-icons. Therefore, the answer would be yes, just export e.g. a png-image but I think your question goes in another direction. – halirutan Oct 18 '12 at 15:09
And, before exporting to png you can scale the image using ImageResize. For a 128x128 pixels icon: ImageResize[ExampleData[{"TestImage", "Lena"}], {128, 128}]. – VLC Oct 18 '12 at 15:29
Thank you. That is more or less what I wanted to do. However, after I do that (for example with Lena as proposed) the PC does not recognize it as an icon file. For instance, I cannot use it for changing an icon of a shortcut. – Alexei Boulbitch Oct 18 '12 at 15:36
@AlexeiBoulbitch You might use one of the tools that are available online. – VLC Oct 19 '12 at 9:34
Version 9 will add support for .ICO export and .ICNS import/export. – John Fultz Oct 20 '12 at 3:56

Here in response to the request of Kuba I give the answer to my own question. I an not the author to this answer, and I have to apologize, since I did not record, who gave this answer, and where it has been given. Anyway, here it is.

The answer would be yes, just export e.g. a png-image. And, before exporting to png you can scale the image using ImageResize. For a 128x128 pixels icon:

imLena = ImageResize[ExampleData[{"TestImage", "Lena"}], {128, 128}]

You further need a specific file format (.ico, .icns,...). If you are on Windows and if you mean the Windows-typic ICO files, than it seems you have to use another tool. Although Mathematica can import those files, it cannot export them. You might use one of the tools that are available online:

Among these references there is a nice tool converting png files into ico files. Its address is: . The operation is as follows:

Step 1: Make an image needed to be transformed into ico and resize it as it is shown above.

Step 2: Export it as a png file.

Step 3: Open the "convertico" page , at the text field "Select File From Your Computer" click the button "Browse" and navigate to the png file in question. Click the button "Go".

Step 4: Click the rose field with the white arrow. In the dialog that will appear choose "Save file". Bring the saved ico file into the directory for icons. The current directory on this machine is C://Windows/Custom icons.

Step 5: Go to the icon to be replaced/Properties/Customize/Change icon and in the dialog that will appear browse to the desired ico file

Now my estimate of this procedure. I works perfectly, enabling one to make really nice icons just out of the collection of Google pictures or from the images obtained within Mma. Like this one, for instance, enter image description here.

I have a problem with the system, however, that is PC/XP. The icon are shown sometimes, and sometimes they are not. Sometimes they are shown from the moment when my computer is just switched on (as it is expected from any descent icon), and sometimes after computer has already worked several hours. Probably, I put them into a wrong location. I do not know.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.