views:

285

answers:

3

I am working on a project that requires a number of icons generated from a set of source images. I have a script that generates all the required images with judicious use of ImageMagick, although I have not found a suitable tool to package the images as icons.

I have a set of png files (from dimensions of 16x16 up to 256x256, and in a range of bit depths) and I would like to generate some nice vista icons in the build script. The closest tool I have found to what I need is png2ico, although this fails to cope with the large Vista icons, and does not support proper transparency in the icons it produces.

Before I invest time in writing such a tool, does anyone know of anything that will do the job?

+1  A: 

Before I invest time in writing such a tool, does anyone know of anything that will do the job?

The png2ico web page that you provided has a link to the source code for the tool.

Why not start by just trying to fix the tool you have?

jussij
Since the code is quite low level I would have to work out the file format and it would require versions for several colour depths, I would probably be able to knock out some quick and dirty WinAPI code to do it far quicker. That, and the fact that my C is not up to scratch.
Oliver Hallam
A: 

Not sure if this will fit the bill, but the description says it supports "batch" operations so you should be able to automate the process.

GConvert

GConvert is a full-featured icon toolkit that lets you extract, create, edit, manage, compile and convert icons. It reads any icon resource file (EXE, DLL, ICL, OCX, NIL, CPL, SCR, RSRC, ICNS...) and then allows you to save extracted icons in other image formats (ICO, BMP, PNG, GIF, Photoshop PSD, JPG and more

The page also specifically mentions that it fully supports Vista icons. Caveat is that there's a free trial but the license is $25.00

Jay
I've just had a look at that tool. The "batch mode" seems to only be activatable through the GUI and hence not what I am looking for. Otherwise it seems it would do the job.
Oliver Hallam
+1  A: 

Since GConvert won't work for you, perhaps this will be more useful:

Resource Tuner Console

Resource Tuner Console is an efficient and highly customizable script driven resource editor with a command-line interface that supports the creation and editing of resources in 32- and 64-bit Windows EXE or DLL files.

See specifically the batch manipulation of icons page for some additional info:

Unrelated, but also may be useful: How to compile Windows Vista icons

Jay
That seems to do exactly what I need; although I am loathe to spend $100 on an app which I only need a tiny amount of functionality in. I guess I just need to work out whether quickly hacking together a tool is less than $100 worth of effort (I suspect not).
Oliver Hallam