For development purposes, install the optional packages with:
pip install jpegzip[dev]This will install the following tools:
- Black: A code formatter to ensure consistent style.
- isort: A tool for sorting imports automatically.
- Pytest: A testing framework for running unit tests.
Run the test suite to ensure everything is working:
python -m pytestHere are the main imports available in the package:
# Image compression imports
from jpegzip.compression.image_compression import ImageCompression
# Video compression imports
from compression.video_compression import VideoCompression
# To load and save images
from utils.file_system import load_image, save_image
# To plot the two images
from jpegzip.utils.plots import plot_compression
# The JPEGCompression Algorithm
from jpegzip.compression.jpeg_compression import JPEGCompressionAll plots generated by the plot_compression function are saved in the plots directory.