An alternative binary encoded vector graphics format.

Why another format?

SVG is a horribly complex format and an overkill for most projects. The specification includes way too many edge cases so implementing a new SVG renderer will always have drawbacks or missing pieces.

TinyVG tries to be simpler. Fewer features, but powerful enough to cover 90% of use cases.

Features

Demo

The tiger is rendered with the current implementation of the TinyVG renderer:

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.

Real World Data

TinyVG is benchmarked against a huge set of test images from MaterialDesign, Papirus, W3C, Zig and freesvg.org

A short summary is that TVG is typically between 20% and 50% of the equivalent SVG file in size and way easier to parse or render.

See the benchmark results

Resources

Specification

The specification is a human-readable, informal description of the format. It should enable programmers to create new TinyVG implementations.

There is also a textual representation that is described roughly in this document:

Example Data

Here you can download some TinyVG files to inspect or toy around with:

Tooling

The tools provide a TinyVG renderer as well as a text format converter for TinyVG text and SVG.

Native Library

The native library is suitable for integrating TinyVG into native projects. Be it Zig, Rust, C or C++, you can use this library with any language that supports the C ABI. This also includes dotnet via P/Invoke and Java via JNI. Right now, only a C API is provided, wrapping to other languages must be done manually at this time.

The library provides means to render TinyVG to bitmaps and SVG (text).

Polyfill

There's also a polyfill available that allows you to use TinyVG in the browser:

Contribution

The main development work is done at GitHub, but feel free to send a email to contact@tinyvg.tech.

There also is a Discord Community for a more casual and quick interaction, you can also get help there!