mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Thumbs: Improve README.md and inline docs in vips_icc.go #5178
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
66926905fd
commit
64f73f156a
2 changed files with 9 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
## PhotoPrism — Thumbnails Package
|
||||
|
||||
**Last Updated:** November 23, 2025
|
||||
**Last Updated:** November 24, 2025
|
||||
|
||||
### Overview
|
||||
|
||||
|
|
@ -35,18 +35,20 @@
|
|||
|
||||
### ICC & Interop Handling
|
||||
|
||||
- EXIF `InteropIndex` codes we honor (per EXIF TagNames and regex.info):
|
||||
- EXIF `InteroperabilityIndex` codes we honor (per EXIF TagNames and regex.info):
|
||||
- `R03` → Adobe RGB (1998) compatible (`a98.icc`, etc.)
|
||||
- `R98` → sRGB (assumed default; no embed)
|
||||
- `THM` → Thumbnail (treated as sRGB; no embed)
|
||||
- If an ICC profile already exists, we skip embedding.
|
||||
- Exiftool name differs (libvips expects `exif-ifd4-InteroperabilityIndex`):
|
||||
```
|
||||
exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s file.jpg
|
||||
```
|
||||
- Test Files:
|
||||
- `testdata/interop_index.jpg` — R03 interop tag, no ICC (expects Adobe profile embed).
|
||||
- `testdata/interop_index_srgb_icc.jpg` — R03 tag with embedded ICC (must remain unchanged).
|
||||
- `testdata/interop_index_r98.jpg` — R98 interop tag, no ICC (should stay sRGB without embedding).
|
||||
- `testdata/interop_index_thm.jpg` — THM interop tag, no ICC (thumbnail; should remain unchanged).
|
||||
- Command:
|
||||
- `exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s filename.jpg`
|
||||
- References:
|
||||
- [EXIF TagNames (InteroperabilityIndex)](https://unpkg.com/exiftool-vendored.pl@10.50.0/bin/html/TagNames/EXIF.html)
|
||||
- [Digital-Image Color Spaces: Recommendations and Links](https://regex.info/blog/photo-tech/color-spaces-page7)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ import (
|
|||
// Sources: EXIF TagNames (R03=Adobe RGB, R98=sRGB, THM=thumbnail)
|
||||
// https://unpkg.com/exiftool-vendored.pl@10.50.0/bin/html/TagNames/EXIF.html
|
||||
// Additional context: https://regex.info/blog/photo-tech/color-spaces-page7
|
||||
// Note: exiftool refers to this tag as "InteropIndex"; in libvips/govips the
|
||||
// corresponding field name is "exif-ifd4-InteroperabilityIndex".
|
||||
// Exiftool example: exiftool -InteropIndex -InteropVersion -icc_profile:all -G -s file.jpg
|
||||
const (
|
||||
// InteropIndexAdobeRGB is the EXIF code for Adobe RGB (1998) ("R03").
|
||||
InteropIndexAdobeRGB = "R03"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue