Skip to content

Commit 64f73f1

Browse files
committed
Thumbs: Improve README.md and inline docs in vips_icc.go photoprism#5178
Signed-off-by: Michael Mayer <[email protected]>
1 parent 6692690 commit 64f73f1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

internal/thumb/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## PhotoPrism — Thumbnails Package
22

3-
**Last Updated:** November 23, 2025
3+
**Last Updated:** November 24, 2025
44

55
### Overview
66

@@ -35,18 +35,20 @@
3535

3636
### ICC & Interop Handling
3737

38-
- EXIF `InteropIndex` codes we honor (per EXIF TagNames and regex.info):
38+
- EXIF `InteroperabilityIndex` codes we honor (per EXIF TagNames and regex.info):
3939
- `R03` → Adobe RGB (1998) compatible (`a98.icc`, etc.)
4040
- `R98` → sRGB (assumed default; no embed)
4141
- `THM` → Thumbnail (treated as sRGB; no embed)
4242
- If an ICC profile already exists, we skip embedding.
43+
- Exiftool name differs (libvips expects `exif-ifd4-InteroperabilityIndex`):
44+
```
45+
exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s file.jpg
46+
```
4347
- Test Files:
4448
- `testdata/interop_index.jpg` — R03 interop tag, no ICC (expects Adobe profile embed).
4549
- `testdata/interop_index_srgb_icc.jpg` — R03 tag with embedded ICC (must remain unchanged).
4650
- `testdata/interop_index_r98.jpg` — R98 interop tag, no ICC (should stay sRGB without embedding).
4751
- `testdata/interop_index_thm.jpg` — THM interop tag, no ICC (thumbnail; should remain unchanged).
48-
- Command:
49-
- `exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s filename.jpg`
5052
- References:
5153
- [EXIF TagNames (InteroperabilityIndex)](https://unpkg.com/[email protected]/bin/html/TagNames/EXIF.html)
5254
- [Digital-Image Color Spaces: Recommendations and Links](https://regex.info/blog/photo-tech/color-spaces-page7)

internal/thumb/vips_icc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010
// Sources: EXIF TagNames (R03=Adobe RGB, R98=sRGB, THM=thumbnail)
1111
// https://unpkg.com/[email protected]/bin/html/TagNames/EXIF.html
1212
// Additional context: https://regex.info/blog/photo-tech/color-spaces-page7
13+
// Note: exiftool refers to this tag as "InteropIndex"; in libvips/govips the
14+
// corresponding field name is "exif-ifd4-InteroperabilityIndex".
15+
// Exiftool example: exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s file.jpg
1316
const (
1417
// InteropIndexAdobeRGB is the EXIF code for Adobe RGB (1998) ("R03").
1518
InteropIndexAdobeRGB = "R03"

0 commit comments

Comments
 (0)