Metadata-Version: 2.1
Name: farbfeld
Version: 0.1.0
Summary: Loader for the farbfeld image format.
Home-page: https://github.com/jmp/farbfeld
Author: Jarkko Piiroinen
Author-email: jmp@python.mail.kapsi.fi
License: MIT
Description: # farbfeld.py
        
        This is a small Python module for extracting pixel data from
        farbfeld images: https://tools.suckless.org/farbfeld/
        
        Currently it only has one public function, `farbfeld.read`.
        It returns the pixels as row by row, column by column as
        a nested list.
        
        ## Usage
        
        To read an image, open the desired file and read the pixels
        from it using `farbfeld.read`:
        
        ```python
        import farbfeld
        
        with open('image.ff', 'rb') as f:
            data = farbfeld.read(f.read())
        ```
        
        Since farbfeld stores pixel components as 16-bit unsigned
        integers, it may be useful in some cases to normalize them
        to the [0, 1] range. Then you can visualize it, for example
        using `matplotlib`:
        
        ```python
        import farbfeld
        import matplotlib.pyplot as plt
        
        with open('image.ff', 'rb') as f:
            data = farbfeld.read(f.read(), normalize=True)
            plt.imshow(data, interpolation='nearest')
            plt.show()
        ```
        
Platform: any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Graphics
Description-Content-Type: text/markdown
