Go to footer

Create Windows icon -> script already written?

Discussions on script-fu scripts for GIMP, help with scripts, best practice examples and more.

Moderator: Wilbers


Create Windows icon -> script already written?

Postby rclobus » Fri Jul 06, 2012 1:25 pm

Hello,

I'm looking for a script that creates Windows icons from an SVG image. I've seen in the repository that Iconify2.scm will create Windows icons, but is does not generate the large icons format at 256x256 (which I also would like to have).

Before I start to reinvent the wheel, is there already some script that creates the icon file that I can use/modify?
I'm a programmer (C, C++, Java, C#, gawk, etc...) so I could write/adjust existing scripts.

My goal: start gimp without GUI with the script and end up with an ICO file with the SVG nicely rescaled

So my two questions are:
1) Does some script already exist?
2) Should I use Script-Fu or perhaps some other tool?
rclobus
Cave Painting
Cave Painting
 
Posts: 3
Joined: Fri Jul 06, 2012 1:10 pm


Re: Create Windows icon -> script already written?

Postby saulgoode » Sun Jul 08, 2012 4:17 am

I would suggest first trying to modify the line near the middle of iconify2.scm from:
Code: Select all
(mapcar resize-to-dim '(16 32 48))

to:
Code: Select all
(mapcar resize-to-dim '(16 32 48 256))


The script is somewhat dated, so perhaps some other changes will need to be made but it doesn't appear to employ any deprecated features.
User avatar
saulgoode
Etruscan Mural
Etruscan Mural
 
Posts: 77
Joined: Mon Jan 18, 2010 11:03 pm


Re: Create Windows icon -> script already written?

Postby rclobus » Mon Jul 09, 2012 7:39 am

Thanks for your reply.
I'll start by modifying the existing script.
rclobus
Cave Painting
Cave Painting
 
Posts: 3
Joined: Fri Jul 06, 2012 1:10 pm


Re: Create Windows icon -> script already written?

Postby rclobus » Tue Mar 19, 2013 12:15 pm

I got it to work.
The updated script generates icons in 16x16, 32x32 and 48x48 sizes for 4,8 and 32 bits, and also a 256x256x32 icon.

Other modifications:
- The script cleans up the temporary images
- The names of each layer are not 'Work layer copy #..', but 'Work layer #..'
Attachments
iconify2.tar
Updated script, with 256x256 support
(10 KiB) Downloaded 40 times
rclobus
Cave Painting
Cave Painting
 
Posts: 3
Joined: Fri Jul 06, 2012 1:10 pm


Return to Board index

Return to GIMP Script-Fu

Who is online

Users browsing this forum: Google [Bot] and 2 guests