From 3dcd4da54891a1eedc4d8cf4927b1aad808a2fd0 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Tue, 12 Dec 2023 08:40:53 +0900 Subject: [PATCH] Fix the supported image formats table (#2068) --- README.md | 33 +++++++++++++++++---------------- src/lib.rs | 33 +++++++++++++++++---------------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index e77a627fed..b81c16f112 100644 --- a/README.md +++ b/README.md @@ -20,22 +20,23 @@ All image processing functions provided operate on types that implement the `Gen -| Format | Decoding | Encoding | -| ------ | -------- | -------- | -| AVIF | Only 8-bit \*\* | Lossy | -| BMP | Yes | Rgb8, Rgba8, Gray8, GrayA8 | -| DDS | DXT1, DXT3, DXT5 | No | -| Farbfeld | Yes | Yes | -| GIF | Yes | Yes | -| ICO | Yes | Yes | -| JPEG | Baseline and progressive | Baseline JPEG | -| OpenEXR | Rgb32F, Rgba32F (no dwa compression) | Rgb32F, Rgba32F (no dwa compression) | -| PNG | All supported color types | Same as decoding | -| PNM | PBM, PGM, PPM, standard PAM | Yes | -| QOI | Yes | Yes | -| TGA | Yes | Rgb8, Rgba8, Bgr8, Bgra8, Gray8, GrayA8 | -| TIFF | Baseline(no fax support) + LZW + PackBits | Rgb8, Rgba8, Gray8 | -| WebP | Yes | Rgb8, Rgba8 \* | +| Format | Decoding | Encoding | +| -------- | ----------------------------------------- | --------------------------------------- | +| AVIF | Only 8-bit \*\* | Lossy | +| BMP | Yes | Rgb8, Rgba8, Gray8, GrayA8 | +| DDS | DXT1, DXT3, DXT5 | No | +| Farbfeld | Yes | Yes | +| GIF | Yes | Yes | +| HDR | Yes | Yes | +| ICO | Yes | Yes | +| JPEG | Baseline and progressive | Baseline JPEG | +| OpenEXR | Rgb32F, Rgba32F (no dwa compression) | Rgb32F, Rgba32F (no dwa compression) | +| PNG | All supported color types | Same as decoding | +| PNM | PBM, PGM, PPM, standard PAM | Yes | +| QOI | Yes | Yes | +| TGA | Yes | Rgb8, Rgba8, Bgr8, Bgra8, Gray8, GrayA8 | +| TIFF | Baseline(no fax support) + LZW + PackBits | Rgb8, Rgba8, Gray8 | +| WebP | Yes | Rgb8, Rgba8 \* | - \* Requires the `webp-encoder` feature, uses the libwebp C library. - \*\* Requires the `avif-decoder` feature, uses the libdav1d C library. diff --git a/src/lib.rs b/src/lib.rs index 8122d05abb..08b47835e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,22 +208,23 @@ pub mod flat; /// /// /// -/// | Format | Decoding | Encoding | -/// | ------ | -------- | -------- | -/// | AVIF | Only 8-bit | Lossy | -/// | BMP | Yes | Rgb8, Rgba8, Gray8, GrayA8 | -/// | DDS | DXT1, DXT3, DXT5 | No | -/// | Farbfeld | Yes | Yes | -/// | GIF | Yes | Yes | -/// | ICO | Yes | Yes | -/// | JPEG | Baseline and progressive | Baseline JPEG | -/// | OpenEXR | Rgb32F, Rgba32F (no dwa compression) | Rgb32F, Rgba32F (no dwa compression) | -/// | PNG | All supported color types | Same as decoding | -/// | PNM | PBM, PGM, PPM, standard PAM | Yes | -/// | QOI | Yes | Yes | -/// | TGA | Yes | Rgb8, Rgba8, Bgr8, Bgra8, Gray8, GrayA8 | -/// | TIFF | Baseline(no fax support) + LZW + PackBits | Rgb8, Rgba8, Gray8 | -/// | WebP | Yes | Rgb8, Rgba8 | +/// | Format | Decoding | Encoding | +/// | -------- | ----------------------------------------- | --------------------------------------- | +/// | AVIF | Only 8-bit | Lossy | +/// | BMP | Yes | Rgb8, Rgba8, Gray8, GrayA8 | +/// | DDS | DXT1, DXT3, DXT5 | No | +/// | Farbfeld | Yes | Yes | +/// | GIF | Yes | Yes | +/// | HDR | Yes | Yes | +/// | ICO | Yes | Yes | +/// | JPEG | Baseline and progressive | Baseline JPEG | +/// | OpenEXR | Rgb32F, Rgba32F (no dwa compression) | Rgb32F, Rgba32F (no dwa compression) | +/// | PNG | All supported color types | Same as decoding | +/// | PNM | PBM, PGM, PPM, standard PAM | Yes | +/// | QOI | Yes | Yes | +/// | TGA | Yes | Rgb8, Rgba8, Bgr8, Bgra8, Gray8, GrayA8 | +/// | TIFF | Baseline(no fax support) + LZW + PackBits | Rgb8, Rgba8, Gray8 | +/// | WebP | Yes | Rgb8, Rgba8 | /// /// ## A note on format specific features ///