Metadata-Version: 2.1
Name: ff2dec
Version: 2.1.0
Summary: Pure-Python decoder for farbfeld v1 and v2 (.ff) images, with PNG/PPM/PAM output
License: 0BSD
Project-URL: Homepage, https://www.sillylaird.ca/farbfeld/
Keywords: farbfeld,image,decoder
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ff2dec

Pure-Python decoder for [farbfeld](https://www.sillylaird.ca/farbfeld/) v1 and v2 (`.ff`, `.ff.gz`) — lossless, near-lossless, palette, 16-bit, animated, tiled and lossy files. No dependencies. Written from the spec as an independent check of it, so it is slow: meant for small files, scripts and tests.

    pip install --index-url https://www.sillylaird.ca/farbfeld/simple/ ff2dec

    ff2dec in.ff out.png            # also .ppm, .pam; animations -> out-0.png, out-1.png, ...
    ff2dec in.ff                    # verify only

    import ff2dec
    im = ff2dec.read("in.ff")       # path or bytes; gzip detected
    im.width, im.height, im.depth, im.frames[0]   # RGBA bytes (8-bit, or 16-bit big-endian when im.depth == 16)

Lossy (kind 8) files use a floating-point IDCT, so pixels can differ by 1 from the JavaScript decoder.
