/JPEG-Compression

JPEG grey scale image compression algorithm

Primary LanguagePythonMIT LicenseMIT

JPEG Compression Algorithm

Compress grey scale image files to selected quality.
This algorithm uses Discrete Cosine Transform to compress images

Requirements

  • Python 3 (3.6 or newer)
  • Python image library (Pillow)

How to use

  • Install Python 3
  • Install Pillow (Python image library)
  • Edit main.py and specify image location and quality
  • Run main.py

Installing Pillow

Windows

Type in command prompt

python -m pip install Pillow

MacOS

Type in terminal

pip install Pillow

Linux

Type in bash

sudo pip3 install Pillow

Code Tested with

  • Python 3.7
  • Pillow 5.4.1