SVG 2 PNG 4 KDE Script

Icon Sub-Sets

Source i (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
Become a Fan
5.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:

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.


Ratings & Comments

10 Comments

tyrerj

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.

mimecine

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

vitanova

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!

vitanova

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)

systemx

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

leinir

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 ;) ).

vitanova

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

vitanova

"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.

leinir

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 :)

Doches

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

Pling
0 Affiliates
Details
license
version
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Icon Sub-Sets from vitanova:

Crystal Sources Everywhere!
vitanova
last update date: 21 years ago

Score 5.0

Icon Guide
vitanova
last update date: 21 years ago

Score 5.0

Kiddo
vitanova
last update date: 23 years ago

Score 5.0

Black & White
vitanova
last update date: 23 years ago

Score 5.0

Other Icon Sub-Sets:

Gajim Ubuntu Iconset
draco
last update date: 18 years ago

Score 5.0

MyOxygen-Shell
elav
last update date: 11 years ago

Score 5.3

Kubuntu Cloud Folder
DanteAshton
last update date: 15 years ago

Score 5.7

Mozilla Icons for BC Tango
morph027
last update date: 18 years ago

Score 5.7

Chricons
chriscenery
last update date: 17 years ago

Score 5.0

Mimetype icons for LibreOffice
Magog64
last update date: 13 years ago

Score 5.0



System Tags