How zenithcodr/dct-image-compression works
This project is a teaching implementation of JPEG-style, lossy image compression and quality analysis—not a JPEG bitstream encoder. Users load an image through the CLI or Tkinter app, compress it at a selected quality, inspect a reconstruction and metrics, and optionally save a comparison grid; a benchmark capability sweeps quality settings to CSV. The graph follows the sampled CLI, pipeline, math, metrics and I/O code. The benchmark implementation was not sampled, so its documented capability is shown without speculative internal wiring.
Main entry points: pipeline.py Image pipeline · io.py Image I/O · main.py CLI demo · gui.py Tkinter app
Components 17
User interfaces
- CLI demo
main.py - Tkinter app
app/gui.py - Quality sweep
benchmarks
Compression orchestration
- Image pipeline
pipeline/pipeline.py
Signal processing
- RGB / YCbCr
pipeline/color.py - 8×8 blocks
dct_core/blocks.py - DCT / IDCT
dct_core/dct.py - Quantization
dct_core/quant.py
Metrics and output
- Image I/O
io_utils/io.py - Quality metrics
quality/metrics.py
Other components
- CLI user
- GUI user
- Benchmark user
- Image files
- Benchmark CSV
- Reconstructed image
- Comparison grid
Connections 22
- CLI user → CLI demo: runs
- GUI user → Tkinter app: uses
- Benchmark user → Quality sweep: runs
- CLI demo → Image I/O: loads / saves
- CLI demo → Image pipeline: compresses
- CLI demo → Image I/O: builds grid
- Tkinter app → Image I/O: loads / saves
- Tkinter app → Image pipeline: compresses
- Tkinter app → Image I/O: builds grid
- Quality sweep → Benchmark CSV: writes CSV
- Image files → Image I/O: reads / writes
- Image I/O → CLI demo: returns image
- Image I/O → Tkinter app: returns image
- Image pipeline → RGB / YCbCr: converts color
- Image pipeline → 8×8 blocks: splits / merges
- Image pipeline → DCT / IDCT: transforms
- Image pipeline → Quantization: quantizes
- Image pipeline → Quality metrics: measures quality
- Image pipeline → Tkinter app: returns result
- Image pipeline → CLI demo: returns result
- Image I/O → Reconstructed image: saves image
- Image I/O → Comparison grid: saves grid