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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! Glycin allows to decode images into [`gdk::Texture`]s and to extract image
//! metadata. The decoding happens in sandboxed modular image loaders that have
//! to be provided as binaries. The [`glycin-utils`](glycin_utils) for more
//! details.
//!
//! # Example
//!
//! You need to enable the `gdk4` feature for this example to work.
//!
//! ```no_run
//! # use glycin::*;
//! # async {
//! let file = gio::File::for_path("image.jpg");
//! let image = Loader::new(file).load().await?;
//!
//! let height = image.details().height();
//! let texture = image.next_frame().await?.texture();
//! # Ok::<(), ErrorCtx>(()) };
//! ```
//!
//! You can pass the [`texture`](Frame#structfield.texture) of a [`Frame`] to
//! [`gtk4::Image::from_paintable()`] to display the image.
//!
//! # External Dependencies
//!
//! Glycin requires the libraries *libglib2.0*, *liblcms2*, *libfontconfig*, and
//! *libseccomp* packages to be installed. For the `gdk4` feature, *libgtk-4* is
//! required as well. To actually work with images, loaders for the respective
//! formats have to be installed. Glycin provides [loaders] for many formats
//! that are packaged with many distributions. When working in the default
//! sandbox mode, the `bwrap` binary of *bubblewrap* is required as well. The
//! required dependencies can usually be installed through commands like
//!
//! ```sh
//! $ apt install libgtk-4-dev liblcms2-dev libfontconfig-dev libseccomp-dev glycin-loaders bubblewrap
//! ```
//!
//! on Debian/Ubuntu or
//!
//! ```sh
//! $ dnf install gtk4-devel lcms2-devel fontconfig-devel libseccomp-devel glycin-loaders bubblewrap
//! ```
//!
//! on Fedora.
//!
//! # Features
//!
//! - `gdk4` --- Enables interoperability with [`gdk4`](gdk) by enabling to get
//! a [`gdk::Texture`] directly.
//! - `tokio` --- Makes glycin compatible with [`zbus`] using [`tokio`].
//!
//! [`gtk4::Image::from_paintable()`]: https://gtk-rs.org/gtk4-rs/git/docs/gtk4/struct.Image.html#method.from_paintable
//! [loaders]: https://gitlab.gnome.org/GNOME/glycin#supported-image-formats
pub use *;
pub use *;
pub use *;
pub use *;
pub use COMPAT_VERSION;
pub use ;
pub use ;
pub use Cicp;
pub use ;
pub use gdk_memory_format;