pycimg 2.0.2

Creator: railscoder56

Last updated:

Add to Cart

Description:

pycimg 2.0.2

README
pycimg is a python extension for the CImg library.
The package contains a single class CImg that provides access to the
image processing methods of the CImg library.
Pixel data of CImg objects can be accessed as a numpy array.
Vice versa new CImg objects can be created from pixel data in a numpy array
or an image file. Supported file formats are png, jpeg, tiff, bmp, and cimg.
from pycimg import CImg
import numpy as np

# Load image from file
img = CImg('test/test.png')
img.display()

# Access pixel data as numpy array
arr = img.asarray()
# Set pixels in upper left 100 x 100 px rectangle
arr[:,:,0:99,0:99] = 0
# Pixel data is shared with the image instance
img.display()

# Create image from numpy array
img = CImg(np.random.randn(100,100))

Features

Access pixel data as a numpy array.
Builtin support for reading/writing png, jpeg, and tiff image formats.



Installation
Install pycimg by running:
pip install pycimg


Documentation
See readthedocs.


License
The project is licensed under the GPL3 license.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.