Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 844 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 844 Bytes

Discrete Cosine Transform (DCT in Rust)

This is a image compression algorithm implemented in Rust using the Discrete Cosine Transform (DCT), inspired by the JPEG compression technique.

Features

  • Load an image and convert it to grayscale
  • Apply the Discrete Cosine Transform (DCT) to the image
  • Quantize the DCT coefficients
  • Apply the inverse DCT to reconstruct the image
  • Save the compressed image

Prerequisites

Rust and Cargo installed. You can download them from here.

Usage

  1. Place the image you want to compress in the project directory and rename it to example.jpg.

  2. Run the project:

    cargo run
    
  3. The compressed image will be saved in the project directory.

License

Licensed under the MIT License.