webp instead of png?
Mon, 2011-11-21 09:19
now that webp supports transparency (http://code.google.com/intl/sk-SK/speed/webp/gallery2.html) will hedgewars be switching to this format to save some space? jose
now that webp supports transparency (http://code.google.com/intl/sk-SK/speed/webp/gallery2.html) will hedgewars be switching to this format to save some space? jose
no.
hmm.. shame.
$ for i in Snow.png NapalmBomb.png TARDIS.png; do ./png2webpll -c 100 -o ${i%%png}.wpl $i; done
png = 152, webpll = 45 bytes (0.296053)
png = 1501, webpll = 1144 bytes (0.762159)
png = 6420, webpll = 3926 bytes (0.611526)
is this a definite answer or i should read it more like 'not until it's supported by fpc'?
jose
Oh. Nice. They made webp a bit less sucky.![Wink Smiley Wink Smiley](/images/smileys/wink.png)
It is now up to where JNG was a decade ago
Anyway. fpc isn't the issue, it would be cross-platform support by SDL that would be.
Still, artifacts are artifacts. Only some images would be appropriate to reencode, assuming of course the good cross-platform support for the lossy format. Do it to a map, and you'd have weird little unexplained roughness to the terrain. Backgrounds would be safe, and land textures.
And, it won't just be SDL, if we get the web port underway, would need good support in all browsers for the lossy format.
Probably the safest would be to just use 2 JPEGs - one for RGB and a single greyscale one for the alpha. That's the way already to get lossy RGBA online in a cross-browser way since the death of JNG (canvas + 2 JPEGs).
Certainly this has been possible for a while. It hasn't happened because... Well, no one has cared that much. PNG allows safe repeated edits and saves, lossy formats do not. The savings in size aren't that significant for things that are not redownloaded that often.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
as for the artifacts: i was referring to lossless version (still experimental) of webp. i do not think any lossy compression would be good for hedgewars graphics either. so let's see whether webp support in sdl/browsers will improve in time.
Ah. Gotcha.
Another thing to consider of course is accessibility. Right now anyone can edit a PNG in anything.
As well as browsers and SDL, there's also acceptance in GIMP and Inkscape (yes, import + trace) to consider. And, oh, Photoshop for those
folks using that...
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev