MCPcopy Create free account
hub / github.com/UprootLabs/poly-flif

github.com/UprootLabs/poly-flif @v0.8.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.2 ↗ · + Follow
1,447 symbols 3,806 edges 85 files 150 documented · 10% updated 7y agov0.8.2 · 2017-08-15★ 24221 open issues

Browse by type

Functions 1,323 Types & classes 124
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Poly FLIF

A browser poly fill for FLIF image format. Since this image format is not supported natively by browsers yet, this project makes it possible to decode FLIF images with Javascript and to then render them on HTML5 Canvas.

Try the interactive demo if you are new to FLIF. The demo allows you to truncate the bitstream and to compare FLIF with other image formats.

For an example of how to use the PolyFLIF API to render FLIF images, see this page.

Status

Mostly stable but needs more testing.

Currently, has been tested manually on latest versions of Chromium and Firefox. No regression tests / CI setup yet.

JS payload size

As of version 0.3, the gzipped and minified payload size is 77KB.

Roadmap

  • Async processing (so as to not block the browser event loop during decode)
  • Animation speed and loop control. #2
  • Code size reduction and performance optimisation.

License

GNU Lesser General Public License (LGPLv3+) in accordance with the upstream license.

Contributing

How to Build

  • Install emscripten
  • Install Java (for the closure compiler)
  • cd src/
  • emmake make

CLA

When you send us a pull request, you acknowledge that * You either hold the copyright to your contribution or you have the permission from the copyright holder to submit the contribution to this project. * You grant the right to Uproot Labs to use your contribution in the project without any strings attached.

About FLIF

FLIF is a lossless image format based on MANIAC compression. MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding) is a variant of CABAC (context-adaptive binary arithmetic coding), where the contexts are nodes of decision trees which are dynamically learned at encode time.

Core symbols most depended-on inside this repo

Shape

Function 853
Method 470
Class 120
Enum 4

Languages

C++82%
C15%
TypeScript3%
Python1%

Modules by API surface

extern/lodepng.cpp221 symbols
raw-tools/sony_arw/dcraw.c187 symbols
extern/stb_image.h174 symbols
src/image/image.hpp101 symbols
src/library/flif-interface_common.cpp39 symbols
src/transform/colorbuckets.hpp37 symbols
src/em-out/flif-demo.js37 symbols
src/fileio.hpp36 symbols
extern/stb_image_write.h35 symbols
src/library/flif-interface_dec.cpp31 symbols
src/flif-dec.cpp30 symbols
src/library/flif-interface_enc.cpp27 symbols

For agents

$ claude mcp add poly-flif \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page