Skip to main content

Python extension for the CImg library.

Project description

Travis Status Coverage Status Documentation Status PyPI version

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 an 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

  • Access pixel data as a numpy array.
  • Builtin support for reading/writing png, jpeg, and tiff image formats.

Installation

Install pycimg by running:

pip install pycimg

Documentation

See readthedocs.

License

The project is licensed under the GPL3 license.

TODO

  • [] Test package with tox
  • [] Add more unit tests
  • [] Colorspace methods
  • [] Add tutorial

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pycimg, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size pycimg-0.0.6-cp35-cp35m-macosx_10_6_intel.whl (8.4 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size pycimg-0.0.6-cp35-cp35m-manylinux2014_x86_64.whl (11.9 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size pycimg-0.0.6-cp35-cp35m-win_amd64.whl (2.3 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size pycimg-0.0.6-cp36-cp36m-macosx_10_6_intel.whl (8.4 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pycimg-0.0.6-cp36-cp36m-manylinux2014_x86_64.whl (12.0 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pycimg-0.0.6-cp36-cp36m-win_amd64.whl (2.5 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pycimg-0.0.6-cp37-cp37m-macosx_10_6_intel.whl (8.4 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pycimg-0.0.6-cp37-cp37m-manylinux2014_x86_64.whl (11.9 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pycimg-0.0.6-cp37-cp37m-win_amd64.whl (2.5 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pycimg-0.0.6-cp38-cp38-macosx_10_9_x86_64.whl (5.4 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size pycimg-0.0.6-cp38-cp38-manylinux2014_x86_64.whl (12.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size pycimg-0.0.6-cp38-cp38-win_amd64.whl (2.6 MB) File type Wheel Python version cp38 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page