# Export Picture to .ico (X-Platform)

**URL:** <https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057>\
**Category:** General\
**Created:** [August 29, 2018, 10:50am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057 "2018-08-29T10:50:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [August 29, 2018, 10:50am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/1 "2018-08-29T10:50:37Z")

</div>

I can on a one by one exception I can use Preview on Mac OS to export an image as a .ico file.

But I prefer to be able to export it from my application.

Hint is (are ?) welcome.

TIA.

PS: from the Picture entry in the LR:

[code]The valid formats are:

```
Picture.FormatBMP
Picture.FormatGIF
Picture.FormatJPEG
Picture.FormatPNG
Picture.FormatTIFF[/code]
```

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://forum.xojo.com/user_avatar/forum.xojo.com/david_cox/32/227_2.png) [@David\_Cox](https://forum.xojo.com/u/David_Cox)\
**Post date:** [August 30, 2018, 7:18am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/2 "2018-08-30T07:18:56Z")

</div>

Isn’t an [ICO file just a limited resolution PNG file](https://en.wikipedia.org/wiki/ICO_(file_format)) with a .ico extension?

Save the picture as a 32x32 PNG.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [August 30, 2018, 7:45am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/3 "2018-08-30T07:45:04Z")

</div>

Thanks.

> [@403188:@David Cox](#):
>
> Save the picture as a 32x32 PNG.

That is not what I saw on Microsoft web site; they were talking about multi sized Icons (squared 16, 32, 48 and 256; more size are desirable).

But I will do that.

Edit: @ 96 dpi I suppose.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [August 31, 2018, 1:22am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/4 "2018-08-31T01:22:16Z")

</div>

An ICO file originally was kinda like an extended bmp file that allowed for multi-sized images. Nowadays ICO files can contain not only bmp data, but also PNG.

Apple’s ImageIO library only supports the BMP variations, and only a handful of icon sizes, and that’s for the macOS only.

So you may need to create your own, the ICO format is fairly well documented and would be a good lesson in learning how to process files at a byte level.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [August 31, 2018, 2:16am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/5 "2018-08-31T02:16:12Z")

</div>

There’s already a class for this available from the following link.

[http://www.great-white-software.com/Xojo\_Code.html](http://www.great-white-software.com/Xojo_Code.html)

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [August 31, 2018, 5:10am UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/6 "2018-08-31T05:10:12Z")

</div>

Thank you Sam.

Nota: Preview, the Mac OS application can export an image (with a png tag at the start of the image file, at 256 x 256 no more higher size) as an .ico file.

Exporting the file as png fail at the set a custom icon to a folder item on Windows 10 1803 (vs the one Apples Preview Generated).

Windows says: (translated from French, so the words can be different, not the error): The file d:\\<file\_name.ico contains no icon..

My first quest (search on the internet) does not lead to anything special, people says what David say: save the image as png and change the `.ico`. Usually, when someone (a WIndows user) told me to change the file Extension to get a specific file, I am sceptikal (or negative), but since I already read that answer on the net I tried it.

.bmp files looks like some Apple IIgs (someone recall this machine ?) image file format, so I am in a know area. I only need the file format. The quest will resume in around two hours (with a faster internet connection).

Thank you all.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:21pm UTC](https://forum.xojo.com/t/export-picture-to-ico-x-platform/45057/7 "2020-10-29T19:21:00Z")

</div>


