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.1a8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e65064c33fe44622b93f271755a3b15d4d1fc8a9af4d1632b9eac64cddc4f1a |
|
MD5 | 65f8922a2fe0cfcdf0adecb9c2172d5a |
|
BLAKE2b-256 | 3b834d02fed21e60330c272395602349e3cfd7fe0b6fcdaec7280297d0923cf2 |
Hashes for pycimg-0.0.1a8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a19b19887f6709e3419d6fcfc934abe2fb5155c4e5a6ead1ce0789328796356 |
|
MD5 | 994ffe748c1af9b4c9db981a8079833d |
|
BLAKE2b-256 | 34f13e2afb987b0b411e622e4effb30591804d6fcb8802c3da86afb6842a7010 |
Hashes for pycimg-0.0.1a8-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad0d923ef6cf678df12ee97932bdb20ca408182d204f4cbe44a4e6c04fabbb5 |
|
MD5 | 0d18c4744daebffe952fcd2671e3a7e2 |
|
BLAKE2b-256 | 49a12548a4944b72ef64e362eb23141b13ccabb501c8e55fd81090c30c61a70b |
Hashes for pycimg-0.0.1a8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82484c92aafc3e5d7b554a1d9f93e386b84b1cdc26c8e63a084bd6340c9ddc9e |
|
MD5 | ed0da22b6c44103a328274e31633f227 |
|
BLAKE2b-256 | 840cbfe837b6ebba3533d2e39012b410f4ac76b7e0b9426687e235b9b65657d1 |
Hashes for pycimg-0.0.1a8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a57a1a11363de1b4f711c37ff448cc59a9462d4df91e837f227d390d1a06cc |
|
MD5 | 89a7dc553b35fb75a26f1204c4189f15 |
|
BLAKE2b-256 | 6bba9726061d3720db367c110508e5a9499e47011217a70c7e2a2436d93e53df |
Hashes for pycimg-0.0.1a8-cp35-cp35m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9112937c8bce51c778cd7535f8a412d6078e81d24b9b9e92755dbedf3734fcd1 |
|
MD5 | bbce9d195011aedd132911763ee576c6 |
|
BLAKE2b-256 | 8d7b8649590ccbefcb64db1c02fafff15873f6208a6687a91f01af5f4e1fb681 |
Hashes for pycimg-0.0.1a8-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b7747777b05ff49fa76ae5cd3e98e0cdb1a4a4408b6be8450644566df3ce21 |
|
MD5 | b035bcffc87dd82f21d8dfa416a16d3d |
|
BLAKE2b-256 | 2545d4e7b062a2e0e09ba01193cd7bd4f7e39b1c1760482d068b0b3766d3f266 |