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.1a6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddcaf3a3c94b5a4f0a3289e6496eeb78e2d95835c1ab65fd7c6c1934e1c81dcf |
|
MD5 | ded5915ddb0432613ffa38a4c259ac1e |
|
BLAKE2b-256 | 2665d908d405ab5ed0790710c0ce712cf5c417b4961eaf2a50a4682d899cb387 |
Hashes for pycimg-0.0.1a6-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79098604e25c03170cbaa51076798a15dd22f55e7c3ac4e188b57f2fd05392a8 |
|
MD5 | 6a838a91ac31f73187b8b09138cfbfc2 |
|
BLAKE2b-256 | f048c5b0b2bb402abc098032b7f0bf64f8d7fcbf8040e4416a97f4060873fc57 |
Hashes for pycimg-0.0.1a6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6075c910af2efd217337d179527475db1c968c7d379ef6cb73f173935b7ad6b3 |
|
MD5 | dabf493814df8f14e2462b765c43437f |
|
BLAKE2b-256 | cb4ae469bf47ece6758fa428d916aa4f166aa4eccbc3c2e9db5b4ad8231c94c3 |
Hashes for pycimg-0.0.1a6-cp35-cp35m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83fff132eb2da18f632fe3e40395efc40feb04d00b18b84a5526e409ea37d5d9 |
|
MD5 | e9a34e4f695282ac8c14a23828e54619 |
|
BLAKE2b-256 | 25bea2b0085037871c008d110849f061eb7d5a7131d5599cdc063d6ac72396bd |