Skip to content

Commit

Permalink
Fix the supported image formats table (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake authored Dec 11, 2023
1 parent 9bbfb7d commit 3dcd4da
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,23 @@ All image processing functions provided operate on types that implement the `Gen

<!--- NOTE: Make sure to keep this table in sync with the one in src/lib.rs -->

| 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.
Expand Down
33 changes: 17 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,23 @@ pub mod flat;
///
/// <!--- NOTE: Make sure to keep this table in sync with the README -->
///
/// | 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
///
Expand Down

0 comments on commit 3dcd4da

Please sign in to comment.