mathiasbynens / 2im

Image preview format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

2im (twim) is an image format designed for extremely-low BPP (bits-per-pixels) range. Name of format hints that a single Twitter message (140 CJK characters, worth at least 287 bytes of payload) is enough to transfer an image.

Unlike SQIP (primitive), output is not directly understood by browser. A tiny (1089 bytes, if compressed) JavaScript decoder is used to rasterize input to ImageData.

See also: interactive demo page and twim vs SQIP comparison.

Coming soon

  • add build / use manual
  • better CLI (set number of therads, "fast" encoding mode)
  • publish decoder as NPM module
  • publish encoder module
  • synchronize Java and C++ implementations

About

Image preview format

License:MIT License


Languages

Language:C++ 50.1%Language:Java 31.2%Language:JavaScript 11.3%Language:Starlark 6.2%Language:CMake 1.2%