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
[x] Setup PyPI distribution
[x] Support numpy array interface
[] Test package with tox
[] Add more unit tests
[] Operator overloads
[] Colorspace methods
[] 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.1a4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83e214685c9e67fcbd5cf19ede319c3340a8122c731f644e249eeb8c1dd753f |
|
MD5 | 714c46805689cc7c60d3191bbce07322 |
|
BLAKE2b-256 | 88e252b7b5e69c06ef59cace502a86d3eca1c4970ff9640b048557ba05ce6aad |
Hashes for pycimg-0.0.1a4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04daf4520f38071e393c3ac43027baeaf79ebb5357bb93f884b644e64249c832 |
|
MD5 | 5cb92b290816672eeffdab2f92f91525 |
|
BLAKE2b-256 | 58604c9de8566d4e69449b5f1ded4fc28f1a27f3345472976e6f972224eac449 |