Computer Science Education - Image Processing Module and Visualization of Distributions
Description
This project consists of two modules for computer science education:
-
Image Processing: A module for simple editing and analysis of images. It allows loading, saving, and displaying images, calculating color depths, and converting palette-based images to RGB.
-
Visualization of Distributions: A module for visualizing two distributions side by side as line or bar charts. Ideal for presenting statistical data in educational settings.
Modules
imageprocessing
This module provides functions for simple processing and analysis of images. The main functions are:
load_image(path_and_filename): Loads an image and calculates its color depth.transform_palette_image_to_rgb(np_image_array, palette): Transforms a palette-based image into an RGB image.pillow_image(numpy_array, palette=None): Converts a NumPy array into a Pillow image.save_image(path, np_image_array, palette=None): Saves an image to a file.show(image_data, show_axes=True, label_data=None, palette_data=None, show_grid=False, grid_color='black', number_of_ticks=None, number_of_columns=1, figsize=None): Displays images in a plot.plot_histogram(histogram, palette='inferno'): Plots a histogram of the brightness values of an image.
diagrams
This module provides a simple way to visualize two distributions. The main function is:
show_distributions(distribution1, distribution2, title1="", title2="", mode="Lines"): Visualizes two distributions as line or bar charts.
Example Usage
Image Processing
from imageprocessing import load_image, show, save_image
# Load image and calculate color depth
image, color_mode, color_depth, palette = load_image('path/to/image.png')
print(f"Color depth: {color_depth} Bit")
# Display image
show(image)
# Save image
save_image('path/to/output_image.png', image, palette)
License
This project is licensed under the MIT License with additional terms for attribution. See the LICENSE file for details.
Metadata
Release files for csedu 0.1.0
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 | |
|---|---|---|---|---|
| csedu-0.1.0.tar.gz | 479.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| csedu-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 487.2 kB
Release files / csedu-0.1.0.tar.gz
| Download URL | csedu-0.1.0.tar.gz |
|---|---|
| Size | 479.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d65725c579c8f088dc84336576f4302750a9169111b654a2763b2a6098d5021f
|
|
BLAKE2b-256 checksum How to use checksums |
b6465ec687ca0be4dd1d5ae668654292cd78c3676dc451b40a33e6551448f9df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / csedu-0.1.0-py3-none-any.whl
| Download URL | csedu-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5c64b541f9e446cca5ee5c06a8c956ae303826699daa5f22b9317de437055dc
|
|
BLAKE2b-256 checksum How to use checksums |
5c6d94f19873cd88cc1cab88ee76be589f3f092683436c2175c8cb3b5ad2b49c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for csedu 0.1.0
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.