Skip to content

a compact binary format for SVG based image placeholders

License

Notifications You must be signed in to change notification settings

hohMiyazawa/bsqip

Repository files navigation

Low bandwidth images can be approximated by SVG shapes, as shown by sqip and primitive.

bsqip aims to further improve compression by using a compact binary format for the generated SVG. This will be competitive to gziped SVG at low file sizes, and less so at larger file sizes.

For larger files, look into the progressive capabilities of mozjpeg

For something production ready, look into blurhash

tools

  • Native bsqip encoder and decoder, based on the SVG generated by primitive (TODO)
  • Javascript bsqip decoder
  • Javascript bsqip encoder

building

Run GNU make

make

usage

(beware this is not completed, use the "demo" directory instead)

bsqip [options] -e -i infile.svg -o outfile.bsqip
bsqip -d -i infile.bsqip -o outfile.svg

-c int  Colour type. 0=8bit greyscale, 1=8bit colour, 2=16bit truecolour (default), 3=24bit rgb
-m int  Shape primitive. 0=triangles (default), 1=rectangles, 2=circles

About

a compact binary format for SVG based image placeholders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published