1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-FileCopyrightText: Alun Jones
// SPDX-FileCopyrightText: Gergely Nagy
// SPDX-FileContributor: Gergely Nagy
//
// SPDX-License-Identifier: MIT
//! **"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 [`ImageGenerator`]s as needed, they're not much more than a thin
//! wrapper around the template.
//!
//! [`fakejpeg`]: https://github.com/gw1urf/fakejpeg
pub use ;
pub use ;
pub use Template;
pub use Pickle;