Skip to main content

Python extension for the CImg library.

Project description

Travis Status AppVeyor 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

  • [] Support python2.7

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pycimg-0.0.4-cp38-cp38-manylinux2014_x86_64.whl (12.1 MB view hashes)

Uploaded CPython 3.8

pycimg-0.0.4-cp37-cp37m-win_amd64.whl (2.4 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

pycimg-0.0.4-cp37-cp37m-win32.whl (2.0 MB view hashes)

Uploaded CPython 3.7m Windows x86

pycimg-0.0.4-cp37-cp37m-manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.7m

pycimg-0.0.4-cp37-cp37m-manylinux1_x86_64.whl (13.6 MB view hashes)

Uploaded CPython 3.7m

pycimg-0.0.4-cp37-cp37m-manylinux1_i686.whl (11.9 MB view hashes)

Uploaded CPython 3.7m

pycimg-0.0.4-cp37-cp37m-macosx_10_6_intel.whl (8.4 MB view hashes)

Uploaded CPython 3.7m macOS 10.6+ intel

pycimg-0.0.4-cp36-cp36m-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

pycimg-0.0.4-cp36-cp36m-win32.whl (2.0 MB view hashes)

Uploaded CPython 3.6m Windows x86

pycimg-0.0.4-cp36-cp36m-manylinux2014_x86_64.whl (12.0 MB view hashes)

Uploaded CPython 3.6m

pycimg-0.0.4-cp36-cp36m-manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.6m

pycimg-0.0.4-cp36-cp36m-manylinux1_i686.whl (11.8 MB view hashes)

Uploaded CPython 3.6m

pycimg-0.0.4-cp36-cp36m-macosx_10_6_intel.whl (8.4 MB view hashes)

Uploaded CPython 3.6m macOS 10.6+ intel

pycimg-0.0.4-cp35-cp35m-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.5m Windows x86-64

pycimg-0.0.4-cp35-cp35m-win32.whl (2.0 MB view hashes)

Uploaded CPython 3.5m Windows x86

pycimg-0.0.4-cp35-cp35m-manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.5m

pycimg-0.0.4-cp35-cp35m-manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.5m

pycimg-0.0.4-cp35-cp35m-manylinux1_i686.whl (11.8 MB view hashes)

Uploaded CPython 3.5m

pycimg-0.0.4-cp35-cp35m-macosx_10_6_intel.whl (8.4 MB view hashes)

Uploaded CPython 3.5m macOS 10.6+ intel

pycimg-0.0.4-cp34-cp34m-win_amd64.whl (2.0 MB view hashes)

Uploaded CPython 3.4m Windows x86-64

pycimg-0.0.4-cp34-cp34m-win32.whl (1.7 MB view hashes)

Uploaded CPython 3.4m Windows x86

pycimg-0.0.4-cp34-cp34m-manylinux1_x86_64.whl (13.4 MB view hashes)

Uploaded CPython 3.4m

pycimg-0.0.4-cp34-cp34m-manylinux1_i686.whl (11.8 MB view hashes)

Uploaded CPython 3.4m

pycimg-0.0.4-cp34-cp34m-macosx_10_6_intel.whl (8.4 MB view hashes)

Uploaded CPython 3.4m macOS 10.6+ intel

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page