SVG 2 PNG 4 KDE Script

Individual Icons/-sets

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
Score 50.0%
Description:

Hi everyone!

I made a little script that can render .svg and .svgz files into png files in the sizes 16x16, 22x22, 32x32, 48x48, 64x64 and 128x128. These are the sizes kde uses for icons. The script uses sodopodi. If you have a lot of .svg and .svgz files, this script can render them automatically to PNGs (if sodipodi is able to open them). A read me is included.

The test suite will render the png icons, as the basic script. It will also
copy the 32 icons to 16x16-1, -2, -3 and 22-1, -2, -3 directories, sharpen
them at different levels, scale them, and sharpen them again at different
levels. For an overview take a look at the svg2png-view.html. The levels of sharpening can be set in the svf2png4kde-suite script. This way you can quickly check out whether your smallest icons can use sharpening.

More scripts at the website:
http://home.uwnet.nl/~vita/linux/index.html
Last changelog:

14 years ago

version 1.1: now with viewerscript.

version 1.1.2:
made the preview script much more practical.
added a Test Suite.

version 1.3
- Make Crystal CVS. This script takes the crystal icons with the long filenames like crsc-mime-kate.svgz, removes the prefix and puts them in directories like a theme.
- Color Changer. This script changes the colors of svg files, working on the source text.
- Stroke Width Changer. Like the color changer, this script changes the width of the stroke.
- some bugs solved
- support for inkscape
version 1.4 run from any dir in path.

tyrerj

15 years ago

Since various scripts are being discussed, I thought that I might mention that The GIMP 2.0 will import SVG icons and render them to pix maps.

Report

mimecine

15 years ago

I'd love to see the two scripts produce three or four icons from the same sources and have them posted somewhere so one can see the difference.

Marco

Report

C

vitanova

15 years ago

I do not think that will be useful. Each icon set is different. The way Leinir made his script works probably best for his own work, mine works best for my work. Try it for yourself!

Report

C

vitanova

15 years ago

There is also another script for this. The svgtoicon script makes smoother icons, the icons the svg2png4kde script makes are sharper. It's a matter of taste. Or may be you like the big ones to be smooth, the smaller ones sharp.

svgtoicons:
http://www.kde-look.org/content/show.php?content=6913

svg2png4kde (this)

Report

systemx

15 years ago

This really saved me allot of time on the Full PNG release of Wasp... Thanx!

Report

MOD

leinir

15 years ago

I know programmers have a funny idea that we wish to re-invent the wheel, but still ;) That said, nicely done, there :) I would say, though, that the way you've done this script does not give you very nice quality icons. When you tell Sodipodi to render icons to a specific size, they come out at a rather low quality. If you in stead render the icon to a large size, say 960 by 960 (the largest size icon supported by Mac OS X, currently the largest icons on the market afaik), and then scale them down from there, the quality is much better. This is the technique I applied in my scripts, svg2icons.sh and makeiconfolder.sh (just posted the update, feel free to look'n'steal ;) ).

Report

C

vitanova

15 years ago

"does not give you very nice quality icons"

A bit to bold for my liking. The icons your script produces are more smooth, mine are sharper. It is a matter of taste.

Report

MOD

leinir

15 years ago

Aah yes, this is true :) Sorry, I only tested the solution with a Crystal-like bunch of icons that I was working on before Reinhardt, and Reinhardt itself :) Thanks :) I'm currently working on a program that will do this (C++ with GUI), and I will be sure to include an option to choose between the two methods :)

Report

C

vitanova

15 years ago

I didn't know your script existed. I will take a look at it.

Report

Doches

15 years ago

...This is awesome. And really (really, really, really...) useful! Thanks!

Report

14 years ago

version 1.1: now with viewerscript.

version 1.1.2:
made the preview script much more practical.
added a Test Suite.

version 1.3
- Make Crystal CVS. This script takes the crystal icons with the long filenames like crsc-mime-kate.svgz, removes the prefix and puts them in directories like a theme.
- Color Changer. This script changes the colors of svg files, working on the source text.
- Stroke Width Changer. Like the color changer, this script changes the width of the stroke.
- some bugs solved
- support for inkscape
version 1.4 run from any dir in path.

12345678910
product-maker Base: 4 x 5.0 Ratings
Fri13
May 13 2011
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
updated Jun 12 2005
added Jan 11 2004
downloads 24h
0
page views 24h 4
System Tags iconset linux unix