DonationCoder.com Forum

Main Area and Open Discussion => General Software Discussion => Topic started by: tinjaw on December 05, 2008, 09:40 AM

Title: wanted: way to batch/script manipulate image (ICO) files
Post by: tinjaw on December 05, 2008, 09:40 AM
I have a bunch of icons (.ICO) files that I need to create various colored set of. For example, all the icons are black on cyan and I need to make a black on red set, a black on green set, etc.

I am looking into the following:

I was wondering if there is some magic tool I am overlooking.

[update]
It looks like GIMP is scriptable with python (http://www.gimp.org/docs/python/index.html).
Title: Re: wanted: way to batch/script manipulate image (ICO) files
Post by: CWuestefeld on December 05, 2008, 01:09 PM
I'd look at scripting ImageMagic (http://www.imagemagick.org/script/index.php). It's very high quality and can do pretty much everything you can imagine (assuming that you can figure out the arguments to send it).
Title: Re: wanted: way to batch/script manipulate image (ICO) files
Post by: scancode on December 05, 2008, 01:27 PM
I'd read the icon, edit it, save as PNG, and use PNG2ICO (http://www.winterdrache.de/freeware/png2ico/index.html)... :)
Title: Re: wanted: way to batch/script manipulate image (ICO) files
Post by: Edvard on December 05, 2008, 02:23 PM
1- Rip the icons: http://www.thugsatbay.com/tab/?q=other_tabiripp
2- Manipulate the png's with Gimp or ImageMagick or PIL (whichever works best and fastest)
3- Pack them back together with your favorite icon editor. I've been liking IcoFx (http://icofx.ro/) lately.

If you want a command-line tool for the re-packing, Matthias Brenkmann's png2ico doesn't do 32-bit icons, so go to http://mattahan.deviantart.com/art/GANT-3-15364715 and download the icon package. Inside is a nifty utility named png2ico written by Andreas Verhoeven (of AveDesk fame (http://www.avedesk.org/)...) that does 32-bit icons. It takes a trip through the help to get the hang of it, but basically it takes all the pngs in a folder and transforms them into bundled ico's at different sizes. The only drawback is it starts with a png and resizes, so start with the biggest one you can extract.
Here's the batch file I use. Just drop a file of 128 px pngs on the .bat :
png2ico.exe -s 128 32bpp -s 64 32.bpp -s 48 32bpp -s 32 32bpp -s 24 32bpp -s 32 16bpp -s24 16bpp -s16 16bpp -i %1 -o %1\icons\
Title: Re: wanted: way to batch/script manipulate image (ICO) files
Post by: Edvard on December 05, 2008, 02:44 PM
Also, the IcoBundle utility can take multiple .ico files and "bundle" them together.
http://www.telegraphics.com.au/sw/#icobundle
Title: Re: wanted: way to batch/script manipulate image (ICO) files
Post by: app103 on December 17, 2008, 06:17 AM
If you want a command-line tool for the re-packing, Matthias Brenkmann's png2ico doesn't do 32-bit icons, so go to http://mattahan.deviantart.com/art/GANT-3-15364715 and download the icon package. Inside is a nifty utility named png2ico written by Andreas Verhoeven (of AveDesk fame (http://www.avedesk.org/)...) that does 32-bit icons. It takes a trip through the help to get the hang of it, but basically it takes all the pngs in a folder and transforms them into bundled ico's at different sizes. The only drawback is it starts with a png and resizes, so start with the biggest one you can extract.
Here's the batch file I use. Just drop a file of 128 px pngs on the .bat :
png2ico.exe -s 128 32bpp -s 64 32.bpp -s 48 32bpp -s 32 32bpp -s 24 32bpp -s 32 16bpp -s24 16bpp -s16 16bpp -i %1 -o %1\icons\

Wow! Thanks! This is going to come in real handy for me. I can finally stop creating my icons from 99x99 256 color .bmp's and manually erasing the backgrounds. (that erasing can take a long time if the edges are not clean or it contains a drop shadow)