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.1a7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0595e0d126f61058dc769cb4bac80e16599832447371f0d09536fb4031b031d8 |
|
MD5 | 2565a2340852523b4345289912965ff5 |
|
BLAKE2b-256 | 29fca5c2521e478eb7cba786c1e31461175a099a75dd48da0290b7d35f6f1b4f |
Hashes for pycimg-0.0.1a7-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 297cbaf0cc176b6b54499eb20eb5d1bd46ca8b41b5c0b220da68d267fbbf0f64 |
|
MD5 | 1ef93ed8c7223c9d8ef1e6bae9692c89 |
|
BLAKE2b-256 | b7a5be15b7cf020564c48f3c8e4f24acfa9202237165d42b02d9aba994eb6a0d |
Hashes for pycimg-0.0.1a7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9a820aaa5ce1bef9a4346d5043b84827f88b36c67e85c97177601d97af19ef6 |
|
MD5 | a22fa211922b3f76060e764c8b234b97 |
|
BLAKE2b-256 | 01ef96529fb03a64945a9d9d6953a9d2cb2d90d56887b7e438bc1c65ebe1c1f1 |
Hashes for pycimg-0.0.1a7-cp35-cp35m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe66b532970d9e33a6192c5322eead6682da4eb0012362500448124c40ac3bbc |
|
MD5 | 836f87c8e638b035ba03cb8e1187fda1 |
|
BLAKE2b-256 | fd208af6910d401e5716b128da77dfb95435c7e72ceb3556420f39efa0cf97ef |