https://github.com/zoni123/image-compressor
An image compressor written in C.
https://github.com/zoni123/image-compressor
bmp-image c c-programming c-programming-language c-project compression-algorithm image-compression image-processing linear-algebra ppm-image singular-value-decomposition work-in-progress
Last synced: 10 months ago
JSON representation
An image compressor written in C.
- Host: GitHub
- URL: https://github.com/zoni123/image-compressor
- Owner: zoni123
- License: mit
- Created: 2025-02-16T18:23:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-02T10:33:45.000Z (11 months ago)
- Last Synced: 2025-08-02T12:33:48.910Z (11 months ago)
- Topics: bmp-image, c, c-programming, c-programming-language, c-project, compression-algorithm, image-compression, image-processing, linear-algebra, ppm-image, singular-value-decomposition, work-in-progress
- Language: C
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-compressor
## Overview
An image compressor which works with P3 and P6 .ppm formats and with 24-bit .bmp format, with 4 levels of compression available. It uses the SVD provided by LAPACK to compress images.
## Installation
### Prerequisites
- GCC
- LAPACK + LAPACKE
- BLAS
### Windows (MSYS2)
1. **Install MSYS2**:
- Download and install MSYS2 from [MSYS2](https://www.msys2.org/).
2. **Update MSYS2**:
- Open the MSYS2 MSYS terminal:
```sh
pacman -Syu
```
3. **Install GCC, LAPACK, BLAS, and LAPACKE**:
- Open the MSYS2 MSYS terminal:
```sh
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-lapack mingw-w64-x86_64-lapacke mingw-w64-x86_64-openblas
```
4. **Set Environment Variables**:
- Ensure that the `bin` directory of MSYS2 MinGW-w64 is added to your system's `PATH`.
### Unix-like Systems (Linux, macOS)
1. **Install GCC**:
- On Debian-based systems:
```sh
sudo apt-get update
sudo apt-get install build-essential
```
- On Red Hat-based systems:
```sh
sudo dnf install gcc gcc-c++
```
2. **Install LAPACK, BLAS, and LAPACKE**:
- On Debian-based systems:
```sh
sudo apt-get install liblapack-dev libblas-dev liblapacke-dev
```
- On Red Hat-based systems:
```sh
sudo dnf install lapack-devel blas-devel lapacke-devel
```
## Build/Clean
```sh
make build
```
```sh
make clean
```
## Usage
```sh
./image_compressor ...
```