Commit Graph
4 Commits
Author SHA1 Message Date
sneak 0813163e4d Drop exifreader's faulty-value text; test unnamed EXIF tags
check / check (push) Successful in 1m18s
A text tag whose value lies outside the file, which exifreader reads as
"<faulty value>", no longer gives a make, model, lens model or offset
field. Tests cover such a JPEG and the backup-metadata dump keying a tag
exifreader has no name for as undefined-<tag number>.

Model: opus-5-5
2026-10-01 19:59:36 +00:00
sneak e623fd2015 Read GPSAltitude without its reference tag; keep unnamed EXIF tags
check / check (push) Successful in 1m25s
exif() takes the altitude from the GPSAltitude tag and negates it only when
GPSAltitudeRef is 1, so a file with GPSAltitude and no GPSAltitudeRef keeps its
altitude, above sea level. A test covers that file.

backup-metadata --exif keeps the EXIF tags exifreader has no name for. The
comments in src/exif.ts say the thumbnail's tags are not kept and that a tag
with several values computes to an array.

Model: opus-5-5
2026-10-01 19:35:52 +00:00
sneak a13ec66bca exif(): read HEIF/HEIC originals with exifreader (closes #145)
check / check (push) Successful in 1m21s
photo.exif() and backup-metadata --exif read EXIF with exifreader,
which reads JPEG, HEIC/HEIF, AVIF, PNG and WebP, so a HEIC original or
a live photo's HEIC image gets its EXIF. exifreader replaces
exif-reader and the hand-written JPEG segment scan. PhotoExif is
unchanged. The exif field of backup-metadata --exif is now
exifreader's tag output, and exifRaw holds the whole EXIF block it
could not read. Tests use a real 933-byte HEIC fixture, test/exif.heic,
whose recipe is in test/exif-heic.ts.

Model: opus-5-5
2026-10-01 18:22:00 +00:00
clawbot 2b598d3622 Photo: save path, is-local, content bytes, metadata and EXIF getters (closes #141)
check / check (push) Successful in 1m24s
`Photo` gains:

- `savePath` and `isLocal`: synchronous, disk only. Where `lib.backup()` writes the original under the library's `downloadDirectory`, and whether all of it is there; a copy only in the cache does not count.
- `content()` and `exif()`: async, may download. `exif()` reads the common EXIF fields of a JPEG and returns `{}` for anything else.
- The getters `modifiedAt` and `hash`, also on `PhotoRecord`, and `year`.

For a live photo the backup has not stored yet, `savePath` carries the title's extension, and the image may be stored under a different one. The JPEG EXIF scan moved to `src/exif.ts`. The exported `PhotoContent` interface gains `savePath` and `isLocal`.

Judgement call: `iso` is read only when the file stores it as a single number.

Model: opus-5-5
2026-10-01 17:58:23 +02:00