Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a tool for that:

https://github.com/mahonnaise/svgjng/

    java -jar svgjng.jar <rgba image> <svgz file name> [color quality] [alpha quality]
It tries PNG and JPEG for RGB and alpha and then uses whichever ended up smaller.

Gallery: http://kaioa.com/b/1102/svgjng/index.html

"SVGZ (auto)" means default parameters. I.e. just:

    java -jar svgjng.jar foo.png foo.svgz


Cool project. Seems dead (last commit in 2011 and no forks), but hey... if it works it works right?


The project itself is done. It does everything it's supposed to do. Some things could be done a bit more efficiently, but it seems to be fast enough. The readme is a bit outdated, but the usage bit (which is printed if you run it without arguments) covers everything.

I kinda lost interest in this project, because, back then, it actually didn't work. The SVG spec had to be fixed first and Chrome didn't even display those images at all due to a bug.

Basically, the problem with the spec was that it required the masks to use some nonsensical color space. Half of the implementations didn't, because it didn't make any sense and because the wording was extremely confusing.

Anyhow, the spec got changed and browsers started to implement this newer version of the spec. Nowadays, it actually does work.

Well, that's basically the whole story. That's why there isn't an article which promotes it. There were showstoppers which made it completely unusable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: