Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 05:44:34 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: wanted: way to batch/script manipulate image (ICO) files  (Read 2861 times)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
wanted: way to batch/script manipulate image (ICO) files
« on: December 05, 2008, 09:40:09 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:
  • python using Python Image Library (but it only handles ICO read-only)
  • python controlling Paint Shop Pro (but I don't own a copy of PSP)
  • using MS Paint, Ritalin, & caffeine

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

[update]
It looks like GIMP is scriptable with python.
« Last Edit: December 05, 2008, 10:03:17 AM by tinjaw »

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,002
    • View Profile
    • Donate to Member
Re: wanted: way to batch/script manipulate image (ICO) files
« Reply #1 on: December 05, 2008, 01:09:43 PM »
I'd look at scripting ImageMagic. 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).

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: wanted: way to batch/script manipulate image (ICO) files
« Reply #2 on: December 05, 2008, 01:27:55 PM »
I'd read the icon, edit it, save as PNG, and use PNG2ICO... :)

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Re: wanted: way to batch/script manipulate image (ICO) files
« Reply #3 on: December 05, 2008, 02:23:35 PM »
1- Rip the icons: http://www.thugsatba...ab/?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 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.devi.../art/GANT-3-15364715 and download the icon package. Inside is a nifty utility named png2ico written by Andreas Verhoeven (of AveDesk fame...) 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\

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Re: wanted: way to batch/script manipulate image (ICO) files
« Reply #4 on: December 05, 2008, 02:44:02 PM »
Also, the IcoBundle utility can take multiple .ico files and "bundle" them together.
http://www.telegraph...com.au/sw/#icobundle

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: wanted: way to batch/script manipulate image (ICO) files
« Reply #5 on: December 17, 2008, 06:17:23 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.devi.../art/GANT-3-15364715 and download the icon package. Inside is a nifty utility named png2ico written by Andreas Verhoeven (of AveDesk fame...) 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)