https://github.com/thisisisa/dct
An image compression algorithm (DCT in Rust).
https://github.com/thisisisa/dct
dct discrete-cosine-transform image-compression rust rust-lang
Last synced: about 2 months ago
JSON representation
An image compression algorithm (DCT in Rust).
- Host: GitHub
- URL: https://github.com/thisisisa/dct
- Owner: thisisisa
- License: mit
- Created: 2024-06-10T15:05:35.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-07T10:50:24.000Z (over 1 year ago)
- Last Synced: 2026-01-16T14:19:57.164Z (5 months ago)
- Topics: dct, discrete-cosine-transform, image-compression, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.rust-lang.org/tools/install).
## 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.
## Contributions
Contributions are welcome. Feel free to open an issue or submit a pull request if you have questions or suggestions.