Converter Buddy
Converter Buddy provides a simple to use way to convert file from a format to another.
Currently only the most popular image formats are supported, but the goal is to extend to documents, audio and video formats.
Basic usage
ConvertibleFile is a conversion utility wrapper for std::fs::File:
let src_path = "tests/assets/test.png";
let file = new;
let format = file.format.expect;
let target_format = Jpeg;
println!;
println!;
match file.convert
You can use the underneath converters if you want to use bytes vectors instead of std::fs primitives:
Compatibility
| From\To | PNG | JPEG | BMP | TIFF | GIF | SVG | WEBP | |
|---|---|---|---|---|---|---|---|---|
| PNG | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✔ |
| JPEG | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✔ |
| BMP | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✔ |
| TIFF | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✔ |
| GIF | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✔ |
| SVG | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✔ |
| WEBP | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |