by tsujp on 3/20/23, 5:27 AM with 120 comments
by ot on 3/20/23, 7:38 AM
tiger.svg.gz 29834
tiger.tvg.gz 20533
app-icon.svg.gz 613
app-icon.tvg.gz 665
comic.svg.gz 25063
comic.tvg.gz 13262
chart.svg.gz 8311
chart.tvg.gz 5369
In most cases, even after gzip compression TVG still has a substantial lead over SVG.This is evidence that the size improvement does not come entirely from the binary format (it would be possible to devise a binary format for SVG without changing the language and semantics), but from the simplified graphic primitives as well. If it was just XML overhead, compression should mitigate most of it.
by oefrha on 3/20/23, 9:23 AM
- Trivial adaptive styling: the simplest case would be matching color of surrounding text;
- Easy and relatively cheap dynamic updates to individual components, trivially integrated with any DOM-manipulation tech, including declarative frameworks big and small.
I don't see a binary format easily replicating those.
Edit: Of course it's okay to have more opaque binary formats.
by archfrog on 3/20/23, 7:07 AM
So fine with new and actually improved technologies instead of the many GUI rehashes that some companies make money off delivering all the time.
I don't often use SVG, and am by no means an expert on it, but I dislike the experience every time. Like having to edit an .SVG file to fix a wrong displacement that places it a bit too far down. Trial and error, trial and error, until you randomly hit the spot that makes the thing begin to behave.
I think TVG popularity boils down to browser support and nothing else. I hope somebody with the skills picks up the task of integrating it into Chromium, then the rest of the world will bend and bow quickly.
Also, one might hope that a freeware GUI editor will see the light in not too long.
Perhaps the authors should do a new single-protocol Mail/Calendar/Contacts/Notes/etc. standard as well? I recall IMAP being a horribly clumsy and complex protocol, and didn't Einstein say:
Make it as simple as you can, but not simpler!
by Dalewyn on 3/20/23, 6:37 AM
by progx on 3/20/23, 8:36 AM
Tried some real life svg files from a current project, all failed: `Node has unsupported transform:` matrix, translate, Failed to translate color spec rgb, ... The transformed files are all larger.
All files are simple SVG without any special content. Exportet from Affinity Designer.
by abdellah123 on 3/20/23, 7:00 AM
I hardly see any way tinyVG (binary) could replace that. But for displaying vector graphics like images, size perf is great :)
by nomercy400 on 3/20/23, 8:22 AM
If I would want to replace my current usage if SVG with TinyVG I would like to know what isn't supported, before I start replacing.
by Pxtl on 3/20/23, 1:10 PM
Everybody trusts user-uploaded JPGs. Trusting user-uploaded svgs is dangerous without detailed domain knowledge.
Json vs XML already demonstrated how less is more.
There are good reasons to enjoy the idea of a vector graphics equivalent to HTML just like there are good reasons to enjoy a vector graphics equivalent to PNG.
by iainmerrick on 3/20/23, 11:58 AM
As others have noted, the size difference is essentially nil if you compare to a gzipped minified SVG (for which there are off-the-shelf tools).
No CSS means you can't easily integrate with CSS animations.
The spec also seems unnecessarily quirky -- I would have expected it to be really, really simplistic and minimal, along the lines of https://qoiformat.org. For example, there's a header flag that sets the "unit" size to 1, 2 or 4 bytes; but also a variable-length encoding for values, so it seems like small uint32 units would mostly fit into 1 byte anyway. Only sRGB colors are supported -- why not linear?
I'd definitely prefer to write a renderer for TinyVG rather than SVG if I were working from scratch. But SVG exists and is pretty well-supported already so you don't have to. (And if I enjoyed working with XML I might actually prefer SVG.)
Possibly TinyVG would be good for embedded systems? If there were a really small and fast implementation, and if anyone has a need for portable vector graphics on a system that can't handle SVG.
by IvanK_net on 3/20/23, 9:28 AM
For most of people, wide support is more important than 20% smaller file size. That is why it is hard for WEBP to replace JPG.
by winter_blue on 3/20/23, 6:31 AM
Also, interestingly, it's written in Zig: https://github.com/TinyVG/sdk
by geokon on 3/20/23, 7:04 AM
Can this be given more substance..?
Does it also apply to SVG v1.1 (Tiny/Basic)? It seems to cover a similarity limited scope. From the landing page its unclear if its fundamentally doing something different. In my naiive perspective itd seem more sensible to just make a new way to encode SVG?
by angelmm on 3/20/23, 6:40 AM
I like this edge on TVG, as a binary format is more optimal for size and you’re not losing much visibility on this case.
I believe TVG popularity will depend on the final use cases. Having to use a poly fill on the browser delays the reproduction of the image until JS is loaded. It would be interesting to compare both cases: download an optimized SVG vs download and print a TVG file using the polyfill.
by est on 3/20/23, 6:27 AM
by gardaani on 3/20/23, 7:34 AM
by dang on 3/20/23, 12:10 PM
TinyVG: A challenger to the throne of vector graphics - https://news.ycombinator.com/item?id=29629792 - Dec 2021 (187 comments)
by userbinator on 3/20/23, 1:25 PM
The original SVG is 96,719 bytes large, while the optimized one is 85,806 bytes large. When converted to TinyVG, the file shrinks to 27,522 bytes. This means we only have 32% size of the optimized source data.
I have a tiger.swf which is 21381 bytes, and since there's another comment here about gzip'ing them, tiger.swf.gz turns out to be only 17296 bytes. In conclusion, I think a subset of SWF, of which much existing rendering code is available, will provide much better efficiency and compatibility than this.
by teaearlgraycold on 3/20/23, 8:13 PM
Having worked a bit with protobuf and CBOR in the last year - the binary encodings are a big pain in the ass. I understand that for massive companies the payoff could be worth it (although I think the people that decide to use proto/CBOR don't calculate the hours wasted on an obtuse encoding scheme), but certainly for small shops you're wasting your time.
by DeathArrow on 3/20/23, 8:47 AM
by osswannabe on 3/20/23, 7:18 PM
Who is this project intended for? I was under the impression that browsers and Adobe products implement their own VG renderers (not client-side JS code provided by websites).
If that's correct, is this project trying to build a format that's better than SVG and parseable out-of-the-box by those renderers?
Or is it trying to get browsers/Adobe to extend their renderers to support TinyVG? If this is true and TinyVG isn't supported yet, how was the website able to render that Tiger picture?
by ha1zum on 3/20/23, 12:57 PM
by al_be_back on 3/20/23, 11:25 AM
perhaps a TVG niche could be around embedded, low-power, slow-connection devices where content is mainly read-only.
by bigattichouse on 3/20/23, 2:23 PM
by veqq on 3/20/23, 6:38 AM
by FreeTrade on 3/20/23, 6:34 AM
by Dork1234 on 3/20/23, 1:14 PM
by nabla9 on 3/20/23, 12:53 PM
Comparing binary format vector graphics against SVG as if there is nothing else seems weird.
by 1-6 on 3/20/23, 1:18 PM
by lalaithion on 3/20/23, 10:42 PM
by giomasce on 3/20/23, 8:00 AM
by specialist on 3/20/23, 4:06 PM
I like how styles are defined up top and referenced thereafter.
Maybe modify the header from 'lisp' to a shebang, like:
#!tinyvg
by b34r on 3/20/23, 2:46 PM
by ar9av on 3/20/23, 10:12 AM