This is a image compression algorithm implemented in Rust using the Discrete Cosine Transform (DCT), inspired by the JPEG compression technique.
- 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
Rust and Cargo installed. You can download them from here.
-
Place the image you want to compress in the project directory and rename it to
example.jpg
. -
Run the project:
cargo run
-
The compressed image will be saved in the project directory.
Licensed under the MIT License.