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.1a5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda9243181017685a961833ea3436c69fbc68c6a8f6a438cb5734e41ac1cad6c |
|
MD5 | 55c94a763625bc3b11ebd22699f59798 |
|
BLAKE2b-256 | 7dc1d22dda9b4e688c1ca84a0a50b273e74d0beff6d32e73e16dbcf2dca9fcd7 |
Hashes for pycimg-0.0.1a5-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724a175d3e3c33c2df176a6c2d7d4ab076e02c7aa1bdfa2dbdcb00734c3f691b |
|
MD5 | f069ee70141430525dcc0094dd97c70e |
|
BLAKE2b-256 | 9a6e2dd5e696f28d10b3e21106e6752750e5a9b9f84dcab398ec2108b9b3f454 |
Hashes for pycimg-0.0.1a5-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c186f4514deaa068f2e55f80720d4e27d0e3f336c867762af126d5bf50b3ac93 |
|
MD5 | 5b990c9c3f79357d19a0037f02926362 |
|
BLAKE2b-256 | 8c51a118baae0a7a8500e212e0a382509650832915ae2b71122674f2fb223af1 |
Hashes for pycimg-0.0.1a5-cp35-cp35m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e90b64d98ba5ce937bcbf71a7e2f3ce40cd526902c1b12bd0955319eb2a02823 |
|
MD5 | 9ecbf8335f4a98ebd6cd01e49741b3be |
|
BLAKE2b-256 | 77eb3d53de2aac16e502299d87651d185a6e26f91fd163d34d474ec8a64e60e7 |
Hashes for pycimg-0.0.1a5-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51153a03a76d2c39c54984c52f6cf6a88892bf850d6a2f99537187a2eed57e20 |
|
MD5 | cdaa3ec128028477184139d09fd4d184 |
|
BLAKE2b-256 | dd5443486765e17b7c908c2e24ef7914f0e3fca8af9fbdad97c69422719252be |