From 5bed477e3b0f1408c8923d34191553c5ee028f9c Mon Sep 17 00:00:00 2001 From: EscapedGibbon Date: Mon, 29 Sep 2025 12:05:59 +0200 Subject: [PATCH 1/4] docs: rework tables about accepted image formats --- docs/basics/working-with-images.md | 33 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/docs/basics/working-with-images.md b/docs/basics/working-with-images.md index 6aea935..2533266 100644 --- a/docs/basics/working-with-images.md +++ b/docs/basics/working-with-images.md @@ -8,14 +8,31 @@ In the context of digital technology and computing, images are represented as a - Currently ImageJS supports images with these characteristics: -| | TIFF | JPEG | PNG | BMP | -| -------------------------------- | ---------------- | ------- | ---------------- | -------- | -| **Bits per channel** | 8 or 16 bits | 8 bits | 8 or 16 bits | 1 bit | -| **Alpha channel** | yes | no | yes | no | -| **Lossy compression** | can be either | yes | no | no | -| **Color Model** | RGB or grayscale | RGB | RGB or grayscale | N/A | -| **Can be loaded in this format** | ✅ | ✅ | ✅ | ❌ | -| **Can be saved in this format** | ❌ | ✅ | ✅ | ✅ | + **DECODING** + +| | TIFF | JPEG | PNG | BMP | +| -------------------------------- | --------------------------- | -------- | --------------------------- | --------------------------- | +| **Can be loaded in this format** | ✅ | ✅ | ✅ | ✅ | +| **Bits per channel** | 1,8 or 16 bits | 8 bits | 1,2,4,8 or 16 bits | 1 or 8bits | +| **Alpha channel** | ✅ | ❌ | ✅ | ✅ | +| **Palette images** | ✅ | ❌ | ✅ | ❌ | +| **Lossy compression** | can be either | yes | no | no | +| **Color Model** | Binary[^1],RGB or grayscale | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | + +[^1]: While binary images can be decoded, for technical reasons image is decoded as a greyscale image. + +- ImageJS can **decode** other PNG formats for, notably, [interlaced images]() and [APNG images](https://en.wikipedia.org/wiki/APNG). + +**ENCODING** + +| | TIFF | JPEG | PNG | BMP | +| ------------------------------- | -------- | -------- | --------------------------- | --------------------------- | +| **Can be saved in this format** | ❌ | ✅ | ✅ | ✅ | +| **Bits per channel** | N/A | 8 bits | 1,2,4,8 or 16 bits | 1 or 8bits | +| **Alpha channel** | N/A | ❌ | ✅ | ✅ | +| **Palette images** | N/A | ❌ | ✅ | ❌ | +| **Lossy compression** | N/A | ✅ | ❌ | ❌ | +| **Color Model** | N/A | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | ### Image coordinates From 1a3f8a4dfa76222714d65ec5e57cd64d253d340b Mon Sep 17 00:00:00 2001 From: EscapedGibbon Date: Mon, 29 Sep 2025 12:19:15 +0200 Subject: [PATCH 2/4] docs: fix spelling mistakes --- docs/basics/working-with-images.md | 4 ++-- project-words.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/basics/working-with-images.md b/docs/basics/working-with-images.md index 2533266..582569a 100644 --- a/docs/basics/working-with-images.md +++ b/docs/basics/working-with-images.md @@ -19,9 +19,9 @@ In the context of digital technology and computing, images are represented as a | **Lossy compression** | can be either | yes | no | no | | **Color Model** | Binary[^1],RGB or grayscale | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | -[^1]: While binary images can be decoded, for technical reasons image is decoded as a greyscale image. +[^1]: While binary images can be decoded, for technical reasons image is decoded as a grayscale image. -- ImageJS can **decode** other PNG formats for, notably, [interlaced images]() and [APNG images](https://en.wikipedia.org/wiki/APNG). +- ImageJS can **decode** [APNG images](https://en.wikipedia.org/wiki/APNG). **ENCODING** diff --git a/project-words.txt b/project-words.txt index ddc22c6..5404a8d 100644 --- a/project-words.txt +++ b/project-words.txt @@ -38,4 +38,5 @@ Dssim mssim GREYA Polylines -anonymization \ No newline at end of file +anonymization +APNG \ No newline at end of file From 19802a49aeb1f6e428fc9d2263e06a0da6c76ce3 Mon Sep 17 00:00:00 2001 From: EscapedGibbon Date: Tue, 30 Sep 2025 10:17:57 +0200 Subject: [PATCH 3/4] docs: update table with supported image formats --- docs/basics/working-with-images.md | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/basics/working-with-images.md b/docs/basics/working-with-images.md index 582569a..e39a743 100644 --- a/docs/basics/working-with-images.md +++ b/docs/basics/working-with-images.md @@ -8,31 +8,19 @@ In the context of digital technology and computing, images are represented as a - Currently ImageJS supports images with these characteristics: - **DECODING** - -| | TIFF | JPEG | PNG | BMP | +| | TIFF | JPEG | PNG[^2] | BMP | | -------------------------------- | --------------------------- | -------- | --------------------------- | --------------------------- | | **Can be loaded in this format** | ✅ | ✅ | ✅ | ✅ | -| **Bits per channel** | 1,8 or 16 bits | 8 bits | 1,2,4,8 or 16 bits | 1 or 8bits | +| **Can be saved in this format** | ❌ | ✅ | ✅ | ✅ | +| **Bits per channel** | 1, 8 or 16 bits | 8 bits | 1, 2, 4, 8 or 16 bits | 1 or 8 bits | | **Alpha channel** | ✅ | ❌ | ✅ | ✅ | | **Palette images** | ✅ | ❌ | ✅ | ❌ | -| **Lossy compression** | can be either | yes | no | no | +| **Lossy compression** | can be either | ✅ | ❌ | ❌ | | **Color Model** | Binary[^1],RGB or grayscale | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | -[^1]: While binary images can be decoded, for technical reasons image is decoded as a grayscale image. - -- ImageJS can **decode** [APNG images](https://en.wikipedia.org/wiki/APNG). - -**ENCODING** +[^1]: ImageJS can also **decode** [APNG images](https://en.wikipedia.org/wiki/APNG). -| | TIFF | JPEG | PNG | BMP | -| ------------------------------- | -------- | -------- | --------------------------- | --------------------------- | -| **Can be saved in this format** | ❌ | ✅ | ✅ | ✅ | -| **Bits per channel** | N/A | 8 bits | 1,2,4,8 or 16 bits | 1 or 8bits | -| **Alpha channel** | N/A | ❌ | ✅ | ✅ | -| **Palette images** | N/A | ❌ | ✅ | ❌ | -| **Lossy compression** | N/A | ✅ | ❌ | ❌ | -| **Color Model** | N/A | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | +[^2]: While binary images can be decoded, for technical reasons image is decoded as a grayscale image. ### Image coordinates From f01ab8beddde92086bcb5f6e74ef8312d093a162 Mon Sep 17 00:00:00 2001 From: EscapedGibbon Date: Tue, 30 Sep 2025 13:29:34 +0200 Subject: [PATCH 4/4] docs: invert footnotes order --- docs/basics/working-with-images.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basics/working-with-images.md b/docs/basics/working-with-images.md index e39a743..cce6a9d 100644 --- a/docs/basics/working-with-images.md +++ b/docs/basics/working-with-images.md @@ -8,7 +8,7 @@ In the context of digital technology and computing, images are represented as a - Currently ImageJS supports images with these characteristics: -| | TIFF | JPEG | PNG[^2] | BMP | +| | TIFF | JPEG | PNG[^1] | BMP | | -------------------------------- | --------------------------- | -------- | --------------------------- | --------------------------- | | **Can be loaded in this format** | ✅ | ✅ | ✅ | ✅ | | **Can be saved in this format** | ❌ | ✅ | ✅ | ✅ | @@ -16,7 +16,7 @@ In the context of digital technology and computing, images are represented as a | **Alpha channel** | ✅ | ❌ | ✅ | ✅ | | **Palette images** | ✅ | ❌ | ✅ | ❌ | | **Lossy compression** | can be either | ✅ | ❌ | ❌ | -| **Color Model** | Binary[^1],RGB or grayscale | RGB | Binary[^1],RGB or grayscale | Binary[^1],RGB or grayscale | +| **Color Model** | Binary[^2],RGB or grayscale | RGB | Binary[^2],RGB or grayscale | Binary[^2],RGB or grayscale | [^1]: ImageJS can also **decode** [APNG images](https://en.wikipedia.org/wiki/APNG).