https://github.com/rmuraix/pixelate
Command-line image processing app written in Rust
https://github.com/rmuraix/pixelate
image-processing
Last synced: 5 months ago
JSON representation
Command-line image processing app written in Rust
- Host: GitHub
- URL: https://github.com/rmuraix/pixelate
- Owner: rmuraix
- License: mit
- Created: 2023-05-09T12:28:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-03T07:59:03.000Z (6 months ago)
- Last Synced: 2026-01-08T10:07:39.037Z (6 months ago)
- Topics: image-processing
- Language: Rust
- Homepage: https://lab.rmurai.com/pixelate/
- Size: 5.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Pixelate
[](./LICENSE)
[](https://github.com/rmuraix/pixelate/actions/workflows/build.yml)
## About
Command line applications for image processing
## Usage
Click [here](https://github.com/image-rs/image#supported-image-formats) to see supported image formats.
```bash
Usage: pixelate --input --output
Commands:
grayscale Convert the image to grayscale
halftone Apply halftoning using the dithering method
gamma Perform gamma correction
invert Apply negative-positive inversion
edge Detect edges (e.g., Sobel)
help Print this message or the help of the given subcommand(s)
Options:
-i, --input Path to the image file to be processed
-o, --output Output path for the processed image file
-h, --help Print help
-V, --version Print version
```
### Grayscale
```bash
Usage: pixelate --input --output grayscale [OPTIONS]
Options:
-r, --red Red channel weight [default: 0.2126]
-g, --green Green channel weight [default: 0.7152]
-b, --blue Blue channel weight [default: 0.0722]
-h, --help Print help
```
#### Example

### Halftone
```bash
Usage: pixelate --input --output halftone
Options:
-h, --help Print help
```
#### Example
Produces black-and-white (grayscale) ordered-dither output.

### Gamma
```bash
Usage: pixelate --input --output gamma --gamma
Options:
-g, --gamma Gamma value
-h, --help Print help
```
#### Example
`gamma=0.45`

### Invert
```bash
Usage: pixelate --input --output invert
Options:
-h, --help Print help
```
#### Example

### Edge
```bash
Usage: pixelate --input --output edge [OPTIONS]
Options:
--method
Edge detection method
Possible values:
- sobel: Sobel operator (gradient magnitude)
[default: sobel]
--intensity
Intensity multiplier applied after normalization (>= 0.0)
[default: 1.0]
-h, --help
Print help (see a summary with '-h')
```
#### Example
`method=sobel intensity=2.0`

## Development
- Build: `cargo build` (release: `cargo build --release`)
- Test: `cargo test`
- Format: `cargo fmt --all` (CI enforces `-- --check`)
- Lint: `cargo clippy --all-targets --all-features -- -D warnings`
## Library Usage
You can use Pixelate as a library. Example (apply halftone):
```rust
use image::GenericImageView;
use pixelate::filters::{Filter, HalftoneFilter};
let img = image::open("input.jpg")?.to_rgb8();
let out = HalftoneFilter.apply(&img);
out.save("out.jpg")?;
```
## Contributing
Your contribution is always welcome. Please read [Contributing Guide](https://github.com/rmuraix/.github/blob/main/.github/CONTRIBUTING.md).