Python extension for the CImg library.
Project description
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 a 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
Installation
Install pycimg by running:
pip install pycimg
Documentation
See readthedocs.
License
The project is licensed under the GPL3 license.
TODO
[] Setup PyPI distribution
[] Add more unit tests
[x] Add docs
[] Add tutorial
[] Add support for different Mac OS X versions
[] Support python2.7, 3.4, 3.5, 3.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pycimg-0.0.1a2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f28828804777a4cb4a83e6e7be56122bf7c3c56f3aba11cbc696a82035e356d9 |
|
MD5 | 6e2c67f78642d8a78b8692d6f2c30ee1 |
|
BLAKE2b-256 | 431b24836a8f3c9f9a69c2ca3ff58ce132fd90dd116bde81ff113e499e8051a4 |
Hashes for pycimg-0.0.1a2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c3c715618b672254e39c16ae49df5930aaf3a4e68f6a556319463e498c16fc |
|
MD5 | 83e61245e79f80d4992d50fc01135624 |
|
BLAKE2b-256 | f6ba4104811b7b7e3c7ccf668fbbd19253d4c6d5747aec5524b306661cb77119 |