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
Has anyone achieved this, or can anyone advise me?
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.
[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.
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…
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
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.
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.
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.
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.