Skip to content

Commit

Permalink
QOI: Update to the final spec (git commit 4192cd1 at https://github.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Baryshev committed Dec 20, 2021
1 parent f8bf600 commit a79c6cf
Show file tree
Hide file tree
Showing 3 changed files with 321 additions and 287 deletions.
34 changes: 17 additions & 17 deletions FORMATS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
| N | Image Format | Supported Read Features | Unsupported Read Features | Supported Write Features | Unsupported Write Features | Dependencies |
| -- | ---------------------------------------------------------------------------- | ------------------------ | ------------------------- | ------------------------ | -------------------------- | ------------ |
| 1 | [APNG](https://wikipedia.org/wiki/APNG) | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libpng+APNG patch |
| 2 | [AVIF](https://wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) | **YUV**: 8-bit, 10-bit, 12-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libavif |
| 3 | [BMP](https://wikipedia.org/wiki/BMP_file_format) | **Indexed:** 1-bit, 4-bit, 8-bit (DIB only). **RGB:** 16-bit, 24-bit, 32-bit. <br/><br/>**Compressions:** NONE, RLE4, RLE8. <br/><br/>**BMP Versions:** V1 (DDB), V2, V3, V4, V5. <br/><br/>**Content:** Static, Meta data, ICC profiles. | **Indexed:** 8-bit (in DDB images). <br/><br/>**Compressions:** ALPHABITFIELDS, BITFIELDS, CMYK, CMYK-RLE4, CMYK-RLE8, JPEG, PNG. <br/><br/>**BMP Versions:** OS/2. | Unsupported | - | - |
| 4 | [GIF](https://wikipedia.org/wiki/GIF) | **Indexed:** 8-bit. <br/><br/>**Content:** Static, Animated, Meta data. | - | Unsupported | - | giflib |
| 5 | [ICO and CUR](https://en.wikipedia.org/wiki/ICO_(file_format)) | **Bit depth:** Same to BMP. <br/><br/>**Content:** Static, Multi-paged. | PNG contained images | Unsupported | - | - |
| 6 | [JPEG](https://wikipedia.org/wiki/JPEG) | **Grayscale:** 8-bit. **RGB:** 565 16-bit[[1]](#star-underlying), 24-bit. **BGR:**[[1]](#star-underlying) 24-bit. **YCbCr:** 24-bit. **RGBA:**[[1]](#star-underlying) 32-bit. **BGRA:**[[1]](#star-underlying) 32-bit. **ARGB:**[[1]](#star-underlying) 32-bit. **ABGR:**[[1]](#star-underlying) 32-bit. **CMYK:** 32-bit. **YCCK:** 32-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | **Grayscale:** 8-bit. **RGB:** 565 16-bit[[1]](#star-underlying), 24-bit. **BGR:**[[1]](#star-underlying) 24-bit. **YCbCr:** 24-bit. **RGBA:**[[1]](#star-underlying) 32-bit. **BGRA:**[[1]](#star-underlying) 32-bit. **ARGB:**[[1]](#star-underlying) 32-bit. **ABGR:**[[1]](#star-underlying) 32-bit. **CMYK:** 32-bit. **YCCK:** 32-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | libjpeg or libjpeg-turbo |
| 7 | [JPEG2000](https://wikipedia.org/wiki/JPEG_2000) | **Grayscale:** 8-bit, 16-bit. **RGB:** 24-bit, 48-bit. **YCbCr:** 24-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static. | **Pixel formats:** YCCK, CMYK, LAB, XYZ, and other. <br/><br/>**Content:** Meta data, ICC profiles, images with non-zero position, images with bits per channel greater than 16. | Unsupported | - | jasper |
| 8 | [PCX](https://wikipedia.org/wiki/PCX) | **Indexed:** 1-bit, 4-bit, 8-bit. **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. <br/><br/>**Compressions:** NONE[[2]](#star-pcx-rle), RLE. | - | Unsupported | - | - |
| 9 | [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics) | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | libpng |
| 10 | [QOI](https://phoboslab.org/log/2021/11/qoi-fast-lossless-image-compression) | **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. | Linear color space. | **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. | Linear color space. | - |
| 11 | [SVG](https://wikipedia.org/wiki/Scalable_Vector_Graphics) | **Bit depth:** 32-bit. <br/><br/>**Content:** Static. <br/><br/>See [more](https://razrfalcon.github.io/resvg-test-suite/svg-support-table.html). | **Content:** Animated, Meta data, ICC profiles. <br/><br/>See [more](https://razrfalcon.github.io/resvg-test-suite/svg-support-table.html). | Unsupported | - | resvg |
| 12 | [TGA](https://wikipedia.org/wiki/Truevision_TGA) | **Grayscale:** 8-bit. **Indexed:** 8-bit. **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static, Meta data. | **Content:** Thumbnail images. | Unsupported | - | - |
| 13 | [TIFF](https://wikipedia.org/wiki/TIFF) | **Bit depth:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit, 24-bit, 32-bit, 48-bit, 64-bit. <br/><br/>**Compressions:**[[1]](#star-underlying) ADOBE-DEFLATE, CCITT-RLE, CCITT-RLEW, CCITT-T4, CCITT-T6, DCS, DEFLATE, IT-8BL, IT8-CTPAD, IT8-LW, IT8-MP, JBIG, JPEG, JPEG-2000, LERC, LZMA, LZW, NEXT, NONE, OJPEG, PACKBITS, PIXAR-FILM, PIXAR-LOG, SGI-LOG24, SGI-LOG, T43, T85, THUNDERSCAN, WEBP, ZSTD. <br/><br/>**Content:** Static, Multi-paged, Meta data, ICC profiles. | - | **RGBA:** 32-bit. <br/><br/>**Compressions:**[[1]](#star-underlying) ADOBE-DEFLATE, CCITT-RLE, CCITT-RLEW, CCITT-T4, CCITT-T6, DCS, DEFLATE, IT-8BL, IT8-CTPAD, IT8-LW, IT8-MP, JBIG, JPEG, JPEG-2000, LERC, LZMA, LZW, NEXT, NONE, OJPEG, PACKBITS, PIXAR-FILM, PIXAR-LOG, SGI-LOG24, SGI-LOG, T43, T85, THUNDERSCAN, WEBP, ZSTD. <br/><br/>**Content:** Static, Multi-paged, Meta data, ICC profiles. | - | libtiff |
| 14 | [WAL](http://fileformats.archiveteam.org/wiki/Quake_2_Texture) | **Indexed:** 8-bit. <br/><br/>**Content:** Static, Multi-paged. | - | Unsupported | - | - |
| 15 | [WEBP](https://wikipedia.org/wiki/WebP) | **Bit depth:** 24-bit, 32-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libwebp |
| N | Image Format | Supported Read Features | Unsupported Read Features | Supported Write Features | Unsupported Write Features | Dependencies |
| -- | --------------------------------------------------------------------| ------------------------ | ------------------------- | ------------------------ | -------------------------- | ------------ |
| 1 | [APNG](https://wikipedia.org/wiki/APNG) | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libpng+APNG patch |
| 2 | [AVIF](https://wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) | **YUV**: 8-bit, 10-bit, 12-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libavif |
| 3 | [BMP](https://wikipedia.org/wiki/BMP_file_format) | **Indexed:** 1-bit, 4-bit, 8-bit (DIB only). **RGB:** 16-bit, 24-bit, 32-bit. <br/><br/>**Compressions:** NONE, RLE4, RLE8. <br/><br/>**BMP Versions:** V1 (DDB), V2, V3, V4, V5. <br/><br/>**Content:** Static, Meta data, ICC profiles. | **Indexed:** 8-bit (in DDB images). <br/><br/>**Compressions:** ALPHABITFIELDS, BITFIELDS, CMYK, CMYK-RLE4, CMYK-RLE8, JPEG, PNG. <br/><br/>**BMP Versions:** OS/2. | Unsupported | - | - |
| 4 | [GIF](https://wikipedia.org/wiki/GIF) | **Indexed:** 8-bit. <br/><br/>**Content:** Static, Animated, Meta data. | - | Unsupported | - | giflib |
| 5 | [ICO and CUR](https://en.wikipedia.org/wiki/ICO_(file_format)) | **Bit depth:** Same to BMP. <br/><br/>**Content:** Static, Multi-paged. | PNG contained images | Unsupported | - | - |
| 6 | [JPEG](https://wikipedia.org/wiki/JPEG) | **Grayscale:** 8-bit. **RGB:** 565 16-bit[[1]](#star-underlying), 24-bit. **BGR:**[[1]](#star-underlying) 24-bit. **YCbCr:** 24-bit. **RGBA:**[[1]](#star-underlying) 32-bit. **BGRA:**[[1]](#star-underlying) 32-bit. **ARGB:**[[1]](#star-underlying) 32-bit. **ABGR:**[[1]](#star-underlying) 32-bit. **CMYK:** 32-bit. **YCCK:** 32-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | **Grayscale:** 8-bit. **RGB:** 565 16-bit[[1]](#star-underlying), 24-bit. **BGR:**[[1]](#star-underlying) 24-bit. **YCbCr:** 24-bit. **RGBA:**[[1]](#star-underlying) 32-bit. **BGRA:**[[1]](#star-underlying) 32-bit. **ARGB:**[[1]](#star-underlying) 32-bit. **ABGR:**[[1]](#star-underlying) 32-bit. **CMYK:** 32-bit. **YCCK:** 32-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | libjpeg or libjpeg-turbo |
| 7 | [JPEG2000](https://wikipedia.org/wiki/JPEG_2000) | **Grayscale:** 8-bit, 16-bit. **RGB:** 24-bit, 48-bit. **YCbCr:** 24-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static. | **Pixel formats:** YCCK, CMYK, LAB, XYZ, and other. <br/><br/>**Content:** Meta data, ICC profiles, images with non-zero position, images with bits per channel greater than 16. | Unsupported | - | jasper |
| 8 | [PCX](https://wikipedia.org/wiki/PCX) | **Indexed:** 1-bit, 4-bit, 8-bit. **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. <br/><br/>**Compressions:** NONE[[2]](#star-pcx-rle), RLE. | - | Unsupported | - | - |
| 9 | [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics) | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | **Grayscale:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit. **Indexed:** 1-bit, 2-bit, 4-bit, 8-bit. **RGB:** 24-bit, 48-bit. **RGBA:** 32-bit, 64-bit. <br/><br/>**Content:** Static, Meta data, ICC profiles. | - | libpng |
| 10 | [QOI](http://qoiformat.org) | **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. | Linear color space. | **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static. | Linear color space. | - |
| 11 | [SVG](https://wikipedia.org/wiki/Scalable_Vector_Graphics) | **Bit depth:** 32-bit. <br/><br/>**Content:** Static. <br/><br/>See [more](https://razrfalcon.github.io/resvg-test-suite/svg-support-table.html). | **Content:** Animated, Meta data, ICC profiles. <br/><br/>See [more](https://razrfalcon.github.io/resvg-test-suite/svg-support-table.html). | Unsupported | - | resvg |
| 12 | [TGA](https://wikipedia.org/wiki/Truevision_TGA) | **Grayscale:** 8-bit. **Indexed:** 8-bit. **RGB:** 24-bit. **RGBA:** 32-bit. <br/><br/>**Content:** Static, Meta data. | **Content:** Thumbnail images. | Unsupported | - | - |
| 13 | [TIFF](https://wikipedia.org/wiki/TIFF) | **Bit depth:** 1-bit, 2-bit, 4-bit, 8-bit, 16-bit, 24-bit, 32-bit, 48-bit, 64-bit. <br/><br/>**Compressions:**[[1]](#star-underlying) ADOBE-DEFLATE, CCITT-RLE, CCITT-RLEW, CCITT-T4, CCITT-T6, DCS, DEFLATE, IT-8BL, IT8-CTPAD, IT8-LW, IT8-MP, JBIG, JPEG, JPEG-2000, LERC, LZMA, LZW, NEXT, NONE, OJPEG, PACKBITS, PIXAR-FILM, PIXAR-LOG, SGI-LOG24, SGI-LOG, T43, T85, THUNDERSCAN, WEBP, ZSTD. <br/><br/>**Content:** Static, Multi-paged, Meta data, ICC profiles. | - | **RGBA:** 32-bit. <br/><br/>**Compressions:**[[1]](#star-underlying) ADOBE-DEFLATE, CCITT-RLE, CCITT-RLEW, CCITT-T4, CCITT-T6, DCS, DEFLATE, IT-8BL, IT8-CTPAD, IT8-LW, IT8-MP, JBIG, JPEG, JPEG-2000, LERC, LZMA, LZW, NEXT, NONE, OJPEG, PACKBITS, PIXAR-FILM, PIXAR-LOG, SGI-LOG24, SGI-LOG, T43, T85, THUNDERSCAN, WEBP, ZSTD. <br/><br/>**Content:** Static, Multi-paged, Meta data, ICC profiles. | - | libtiff |
| 14 | [WAL](http://fileformats.archiveteam.org/wiki/Quake_2_Texture) | **Indexed:** 8-bit. <br/><br/>**Content:** Static, Multi-paged. | - | Unsupported | - | - |
| 15 | [WEBP](https://wikipedia.org/wiki/WebP) | **Bit depth:** 24-bit, 32-bit. <br/><br/>**Content:** Static, Animated, Meta data, ICC profiles. | - | Unsupported | - | libwebp |

## References

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@ images with the help of [ksquirrel-libs](FAQ.md#how-old-is-sail), the predecesso

## Supported image formats

| N | Image format | Operations | Dependencies |
| -- | -----------------------------------------------------------------------------| ------------- | ----------------- |
| 1 | [APNG](https://wikipedia.org/wiki/APNG) | R | libpng+APNG patch |
| 2 | [AVIF](https://wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) | R | libavif |
| 3 | [BMP](https://wikipedia.org/wiki/BMP_file_format) | R | |
| 4 | [GIF](https://wikipedia.org/wiki/GIF) | R | giflib |
| .. | ... | | |
| 6 | [JPEG](https://wikipedia.org/wiki/JPEG) | RW | libjpeg-turbo |
| 7 | [JPEG2000](https://wikipedia.org/wiki/JPEG_2000) | R | jasper |
| 8 | [PCX](https://wikipedia.org/wiki/PCX) | R | |
| 9 | [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics) | RW | libpng |
| 10 | [QOI](https://phoboslab.org/log/2021/11/qoi-fast-lossless-image-compression) | RW | |
| 11 | [SVG](https://wikipedia.org/wiki/Scalable_Vector_Graphics) | R | resvg |
| 12 | [TGA](https://wikipedia.org/wiki/Truevision_TGA) | R | |
| 13 | [TIFF](https://wikipedia.org/wiki/TIFF) | RW | libtiff |
| .. | ... | | |
| 15 | [WEBP](https://wikipedia.org/wiki/WebP) | R | libwebp |
| N | Image format | Operations | Dependencies |
| -- | --------------------------------------------------------------------| ------------- | ----------------- |
| 1 | [APNG](https://wikipedia.org/wiki/APNG) | R | libpng+APNG patch |
| 2 | [AVIF](https://wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) | R | libavif |
| 3 | [BMP](https://wikipedia.org/wiki/BMP_file_format) | R | |
| 4 | [GIF](https://wikipedia.org/wiki/GIF) | R | giflib |
| .. | ... | | |
| 6 | [JPEG](https://wikipedia.org/wiki/JPEG) | RW | libjpeg-turbo |
| 7 | [JPEG2000](https://wikipedia.org/wiki/JPEG_2000) | R | jasper |
| 8 | [PCX](https://wikipedia.org/wiki/PCX) | R | |
| 9 | [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics) | RW | libpng |
| 10 | [QOI](http://qoiformat.org) | RW | |
| 11 | [SVG](https://wikipedia.org/wiki/Scalable_Vector_Graphics) | R | resvg |
| 12 | [TGA](https://wikipedia.org/wiki/Truevision_TGA) | R | |
| 13 | [TIFF](https://wikipedia.org/wiki/TIFF) | RW | libtiff |
| .. | ... | | |
| 15 | [WEBP](https://wikipedia.org/wiki/WebP) | R | libwebp |

See the full list [here](FORMATS.md). Work to add more image formats is ongoing.

Expand Down
Loading

0 comments on commit a79c6cf

Please sign in to comment.