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.1b0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d2c85437ce50817542a48d249d5c031ec9d1469cea540978217ca8f8b272b3 |
|
MD5 | 01ab7f886f9df71dbe8bda395b23826a |
|
BLAKE2b-256 | 1d6c59f2d67e69efa660bab029f79754bf9c0fa7d797045609e2f31770ec9c89 |
Hashes for pycimg-0.0.1b0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56cbe298c3d26ec1b8912162b23ca7196acb43a1e2a2e682bb8a4235a6887ad |
|
MD5 | 73f285147ab6e46a9c1c7c53a41c3260 |
|
BLAKE2b-256 | ad106053505fddea28697ebbd7b38cde3b2e2f727da504bde52617395418e74d |
Hashes for pycimg-0.0.1b0-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db98d9d2170689338f9c7e76f721c83b502b257316e065e805ec695a2c4a176 |
|
MD5 | 16298c62e5b978e663ee61f01705ece1 |
|
BLAKE2b-256 | 2e1bd66b8174b78ecdd2516021cf170530f8592c350559f86eba376a8dedca77 |
Hashes for pycimg-0.0.1b0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67dab1547739beed68122c8e72a5907d6472b4d2224fcc928fba0bc062488a6e |
|
MD5 | 9064501067265937721b451efeb5140e |
|
BLAKE2b-256 | 7ec87e5ba530347be68ef548d03fb0db0c6221d22dfce6af3556a503e0a7094e |
Hashes for pycimg-0.0.1b0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e398ddcc2698a6839bfebccb3eaf5505f61dcd0e0187a2cc4f28ae68f9804d |
|
MD5 | c370cff4afdd12322f52a86c63b149bb |
|
BLAKE2b-256 | 5a6ea71c6d71edae7fbc4fce8479d9802938ee308de8f00c6288ba1b2728ba08 |
Hashes for pycimg-0.0.1b0-cp35-cp35m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d9235321f8414179cfe72d0be2cd1263ea3c0409a492a7058448488056c6975 |
|
MD5 | 6729e1b6509bce6fb64ad03579718820 |
|
BLAKE2b-256 | f10f5205f6e0ac193e64e745a684cfb087e1b208ef30cb3032fec28bb33fbf4e |
Hashes for pycimg-0.0.1b0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d04bd20d39dec108abc23006b1ecd5e502a35b88c1054bad820dd0b920119162 |
|
MD5 | 97e605c7f32e0a7da9519b2a41f1121e |
|
BLAKE2b-256 | 5f72cb2c55bc66dc2231fdcefb092b05f4b6d16c7da15e15c88aa2c6b03e067d |