Image novice
A special Python image submodule for beginners.
Description
image_novice is a simple wrapper around the Python Image Library (PIL) for beginners. It allows for easy loading, manipulating, and saving of image files.
NOTE: This module uses the Cartesian coordinate system!
Example
>>> import image_novice as novice # special submodule for beginners
>>> picture = novice.open('sample.png') # create a picture object from a file
>>> print picture.format # pictures know their format...
'png'
>>> print picture.path # ...and where they came from...
'/Users/example/sample.png'
>>> print picture.size # ...and their size
(665, 500)
>>> print picture.width # 'width' and 'height' also exposed
665
>>> picture.size = (200, 250) # changing size automatically resizes
>>> for pixel in picture: # can iterate over pixels
>>> ... if ((pixel.red > 128) and # pixels have RGB (values are 0-255)...
>>> ... (pixel.x < picture.width)): # ...and know where they are
>>> ... pixel.red /= 2 # pixel is an alias into the picture
>>> ...
>>> print picture.modified # pictures know if their pixels are dirty
True
>>> print picture.path # picture no longer corresponds to file
None
>>> picture[0:20, 0:20] = (0, 0, 0) # overwrite lower-left rectangle with black
>>> picture.save('sample-bluegreen.jpg') # guess file type from suffix
>>> print picture.path # picture now corresponds to file
'/Users/example/sample-bluegreen.jpg'
>>> print picture.format # ...has a different format
jpeg
>>> print picture.modified # and is now in sync
False
Metadata
Release files for image_novice 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| image_novice-0.1.3.tar.gz | 16.8 kB | Without provenance | Details for image_novice-0.1.3.tar.gz |
Release files / image_novice-0.1.3.tar.gz
| Download URL | image_novice-0.1.3.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea242a3a3fd0842b4dc81bdae3f8e23575092c44b751c2cff26260faaace44ce
|
|
BLAKE2b-256 checksum How to use checksums |
d6bebe7e35d57567c1a15c02bd2946b0960ca18118768e930865a3fae3161aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for image_novice 0.1.3
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.