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
[] Add more unit tests
[] Add tutorial
[] Support numpy array interface
[] Operator overloads
[] Colorspace methods
[] 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.1a3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbe37bc0e821b1cfccb00b8cabbd73bfdf00aa0df3f15668821ca4d515b2e785 |
|
MD5 | 54cff1c7ec962a7d5a1ffe2f61d0aa1f |
|
BLAKE2b-256 | 92258e5a74cc6a6febb7006c440842c913570613fd40c4a1957ae3f837309b1c |
Hashes for pycimg-0.0.1a3-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7392f988a7476f0c45f9ed4220f7d82e2b85423f0a02e9aab156823cb91cb137 |
|
MD5 | cb1b48bacd4cab9099cff9f7ed524ca5 |
|
BLAKE2b-256 | 9aa4b904a8d4d50dfc16222853370d41f0fb02605e8a39465e9289824a007f4e |