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.1a0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0518718b451fdf14b5776a114b07e43eec91fe3906dc078c5b32c20ca6d37121 |
|
MD5 | f9e364563dbfec2f05255255105150b6 |
|
BLAKE2b-256 | c2a0049116f5ed53be160c8f5984189f032497084141b28d0b22f7b1dbb0c408 |
Hashes for pycimg-0.0.1a0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5615f8bb38ff8a64baab0d14850168443c8edf488c811ee6d9d04f340d368ff |
|
MD5 | 3c365bb336fb92e95d1c7c0d743aca5c |
|
BLAKE2b-256 | ab31afb7941b940e1bd1702a987dd519e55a5d95d6ce8e6d1e8c37a851659adc |