Skip to content

Commit 4b9bfb4

Browse files
committed
chore(tools): docs for the image module
1 parent 10c38cd commit 4b9bfb4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

dir-structure-tools/src/image.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
11
//! Implementations of [`ReadFrom`] and [`WriteTo`] for image files.
2+
//!
3+
//! The [`image`] crate is used for image decoding and encoding.
4+
//!
5+
//! Main wrapper type is the [`Img`] struct, which is generic over an image format.
6+
//! Specific image formats are provided as zero-sized types implementing the [`ImgFormat`] trait.
7+
//!
8+
//! The following image formats are supported, behind feature flags:
9+
//!
10+
//! - PNG (`image-format-png`)
11+
//! - JPEG (`image-format-jpeg`)
12+
//! - GIF (`image-format-gif`)
13+
//! - WebP (`image-format-webp`)
14+
//! - PNM (`image-format-pnm`)
15+
//! - TIFF (`image-format-tiff`)
16+
//! - TGA (`image-format-tga`)
17+
//! - BMP (`image-format-bmp`)
18+
//! - ICO (`image-format-ico`)
19+
//! - HDR (`image-format-hdr`)
20+
//! - OpenEXR (`image-format-exr`)
21+
//! - Farbfeld (`image-format-ff`)
22+
//! - AVIF (`image-format-avif`)
23+
//! - QOI (`image-format-qoi`)
24+
//!
25+
//! For an async VFS implementation to support reading and writing images using these types,
26+
//! the following impls are required for the VFS type:
27+
//!
28+
//! - `impl<T: ImgFormat> ReadImageFromAsync<T> for NewVfsType`
29+
//! - `impl<'a> WriteImageToAsync<'a> for NewVfsType`
30+
//! - `impl<'a> WriteImageToAsyncRef<'a> for NewVfsType`
231
332
#[cfg(all(
433
feature = "assert_eq",

0 commit comments

Comments
 (0)