Expand description
“Fake” jpeg generator library for Rust
This library began as a port of Alun Jones’ fakejpeg Python library to
Rust, using winnow for parsing, and with a focus on performance. Much like
the original library, the generated images aren’t exactly correct, but
they’re - usually - good enough that browsers, and a lot of image viewers
display them nevertheless.
The main components of the library are Template and ImageGenerator:
these can be used to parse JPEG images into a template, and to generate
randomized fakes from said template, as many as you wish.
While a Template is expensive to build, an ImageGenerator isn’t: it
borrows the template for generation purposes. As such, it is recommended to
keep a Template around as long as possible - you’re free to create and
drop ImageGenerators as needed, they’re not much more than a thin
wrapper around the template.
Modules§
- error
- A collection of all the possible error types the library can return.
Structs§
- Config
- Configuration for
ImageGenerator. - Image
Generator - Generate randomized images based on a
Templateand aConfig. - Options
- Configuration options for the
ImageGenerator. - Template
- A Template holds information about a number of JPEG images, and serves as an
input to
ImageGenerator.