Skip to main content

cImage - A simple image processing library for Python

Installation

copy cImage.py to your site-packages directory.

Usage

This image library is not going to give you fancy high performance operations on images. It allows you to read in an image and manipulate its pixels. Then you can save the new image to a file, or you can display the image in a window. Thats really about it, but its really all you want to do if you are teaching an introductory computer science course.

Image Types Supported

If you have PIL installed on your system:

  • jpeg

  • gif

  • tiff

  • png

  • etc.

If you do not have PIL installed then you are stuck with GIF images only.

If you are using Python 2.6/2.7 I recommend you install Pillow its a simple fork of PIL that you can install with easy_install or pip.

If you are using Python 3 You can get a working version of PIL Here: https://pypi.python.org/pypi/Pillow/2.0.0

Note that if you scroll down to the bottom you will find binary installations for Windows. Linux and Mac users can follow the instructions on the page.

Example

from cImage import *
myimagewindow = ImageWin("Image Processing",600,300)
oldimage = FileImage("lutherbell.jpg")
oldimage.setPosition(0,0)
oldimage.draw(myimagewindow)

width = oldimage.getWidth()
height = oldimage.getHeight()
newim = EmptyImage(width,height)

for row in range(height):
    for col in range(width):
            oldpixel = oldimage.getPixel(col,row)
            ave=(oldpixel.getRed()+oldpixel.getGreen()+oldpixel.getBlue())/3
            newim.setPixel(col,row,Pixel(ave,ave,ave))

newim.setPosition(width+1,0)
newim.draw(myimagewindow)

myimagewindow.exitOnClick()

Metadata

Release files for thonny-cImage 1.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thonny-cImage 1.4.2
File Size Uploaded Provenance Actions
thonny-cImage-1.4.2.tar.gz 7.1 kB Without provenance Details for thonny-cImage-1.4.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for thonny-cImage 1.4.2
File Interpreter ABI Platform Actions
thonny_cImage-1.4.2-py3-none-any.whl Python 3 none any Details for thonny_cImage-1.4.2-py3-none-any.whl
thonny_cImage-1.4.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for thonny_cImage-1.4.2-py2.py3-none-any.whl

Total release size: 25.2 kB

Release files / thonny-cImage-1.4.2.tar.gz

Download URL thonny-cImage-1.4.2.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1997027471d7561f0cae47d151471f4a0afd2377dd4c4b0329417723cbf3cd5c
BLAKE2b-256 checksum
How to use checksums
38ddb70efe6b91e3e62d7b372e0bdbbe16c79c044c3e75e6a1eefebafdbf8fab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / thonny_cImage-1.4.2-py3-none-any.whl

Download URL thonny_cImage-1.4.2-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2120c3766b2bb90e5cd4c5bb536cc891d1da7bc653c39cbe08a1544e78b9919
BLAKE2b-256 checksum
How to use checksums
fd2090598ff88fc984a074b4bf4e39b3a9c7d6e5d946680eb26796e6206d5fe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / thonny_cImage-1.4.2-py2.py3-none-any.whl

Download URL thonny_cImage-1.4.2-py2.py3-none-any.whl
Size 9.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5ae10942e8bcb82d0dfc9842ac2a7da66c900ba7aecd9ee438ef3ea068e0a07b
BLAKE2b-256 checksum
How to use checksums
16905a1697e66f970d4f58fd0f50ba9b79a4636a0f8c34c5d05a419472f9afb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for thonny-cImage 1.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.2 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page