Create a .ico file?

Hi,
does anyone know if it is possible to create a .ico file via Xojo?

I can easily create a .icns file by resizing an image multiple times, an then placing them in a folder with a .icns extension, but this fails when trying to create a .ico file :frowning:

Has anyone achieved this, or can anyone advise me?

Thank you all in advance.

There is a program written in Real Basic by Roger Meier : iConstruct.

Unfortunately, his site seems to be down at the moment
http://freeware.the-meiers.org/

His blog is online: http://rogermeier.blogspot.com/2009/07/freeware-update-iconstruct-v120_18.html

I have no idea if he connects often, but he has an account on this forum as well, so you can try to PM.

Thanks Michel, I will try that.

There must be a way to do it, as there are a few apps out thers which do this :slight_smile:

[quote=134742:@Richard Summers]Thanks Michel, I will try that.

There must be a way to do it, as there are a few apps out thers which do this :)[/quote]

There is also the possibility to use a converter. There seems to be a number of them :
https://duckduckgo.com/?q=convert+pic+to+ico+-online

Michel, unfortunately I need to be able to do this from within my app - so 3rd party software is not applicable.
Thanks anyway :slight_smile:

Richard, I have the iConStructWin.zip let me know if you need it. I think the date on it is 7/8/11 I downloaded it some time ago.

Thanks Merv, but I need actual code to use in my app, so third party apps are not an option.
I can easily convert to .ico by using pre-existing software, but I want to be able to do it from within my app.

Thanks for trying to help - much appreciated.

No, it is the actual code that Michel mentioned above. I have the file from Meier’s site in case you can’t find it elsewhere.

It looks like his site is up :slight_smile:

[quote=134767:@Richard Summers]but I need actual code to use in my app, so third party apps are not an option.
I can easily convert to .ico by using pre-existing software, but I want to be able to do it from within my app.[/quote]

Richard, you may think it is easy to create ico from within Xojo, that is unfortunately not the case.

I used myself a portion of VB code in a DLL for my own Windows app that needs ico. But that is not possible with a Mac app.

Roger Meiers is to my knowledge the only one who has been able to do what you want to do. So even if he does not provide the source on his site, download iConstruct, open the zip archive, and look into the Read Me.txt file for his email address. Then if you ask nicely, he may share his code.

The alternative is http://msdn.microsoft.com/en-us/library/windows/desktop/ms648051(v=vs.85).aspx

I could not locate the exact ico file structure. So Roger Meier seems to be the only game in town for Xojo code. Unless you want to spend weeks hacking ico files with your limited programming experience and patience…

Thanks guys.

Wikipedia details the ICO file format reasonably well
Its not so hard
Some is just a pain to manipulate

Michel, I definitely don’t think it is easy - hence why I am asking on here.
I said I can easily do it via 3rd party apps, but I want to learn how to do it :slight_smile:

I guess if Roger seems to be the only one who has achieved it, I will contact him to see if he will share the code.

Thanks.

[quote=134785:@Norman Palardy]Wikipedia details the ICO file format reasonably well
Its not so hard
Some is just a pain to manipulate[/quote]

You are right. I missed that. Thanks.

Still, when it takes one line in VB. NET, what I see at http://en.wikipedia.org/wiki/ICO_(file_format) calls for a lot more work. I’ll stick to my DLL for now :wink:

Richard,

Check out http://www.imagemagick.org/script/binary-releases.php#macosx which is a command line apache 2.0 licensed free tool you could use in your app via the shell. Perhaps you could have your software create the 16/16 or 32/32 png and drop to a shell and have ImageMagick do the conversion?

Better yet I do remember seeing an MBS ImageMagick plugin with examples. I haven’t checked to see if the MBS ImageMagick implementation has the same .png to .ico converter, but I would be surprised if it didn’t.

http://www.monkeybreadsoftware.de/xojo/plugin-imagemagick.shtml

HTH.
Mike

Good idea Mike - I will look into that now.
Thanks.

[quote=134803:@Mike Cotrone]Richard,

Check out http://www.imagemagick.org/script/binary-releases.php#macosx which is a command line apache 2.0 licensed free tool you could use in your app via the shell. Perhaps you could have your software create the 16/16 or 32/32 png and drop to a shell and have ImageMagick do the conversion?

Better yet I do remember seeing an MBS ImageMagick plugin with examples. I haven’t checked to see if the MBS ImageMagick implementation has the same .png to .ico converter, but I would be surprised if it didn’t.

http://www.monkeybreadsoftware.de/xojo/plugin-imagemagick.shtml
[/quote]

The ImageMagick plugin has an amazing number of functions :
http://www.monkeybreadsoftware.net/plugincontent-mbsimagemagickplugin.shtml

The issue, as often with MBS, is that the mere abundance of documentation makes it hard to figure where is the information needed. The description mentions the plugin supports over 100 formats, yet none of the searches seems to lead to any list beyond the few mentioned. Christian ? Ico ?

Michel you are correct since MBS plugins have a TON of features the documentation has suffered as a result in some cases. HOwever I have to point out that I have emailed Christian direct questions about how to implement his plugin’s when I couldn’t battle the docs any longer. He responded extremely quick (minutes) and within the hour had a custom example in xojo code for me to try. Christian’s email support definitely overcomes some of the hard to navigate documentation.

Indeed, his service is excellent. And Plugins Complete is well worth the price :slight_smile:

I wrote pure RB code back in the dark ages… I might be able to find it…