exif(): read HEIF/HEIC originals with exifreader (closes #145) #147

Merged
clawbot merged 5 commits from issue-145-heif-exif into next 2026-10-01 22:34:09 +02:00
5 Commits
Author SHA1 Message Date
sneak 78c64061a3 README: give exif()'s formats as examples, TIFF among them
check / check (push) Successful in 1m57s
The read surface listed JPEG, HEIC/HEIF, AVIF, PNG and WebP as every
format exif() reads, but exifreader reads more, so "any other original
gives {}" was false. The list is now examples.

Model: opus-5-5
2026-10-01 20:23:38 +00:00
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 9c0c7c9489 Test the unset-clock EXIF date; drop the old dump layout from README
check / check (push) Successful in 1m16s
Add a readPhotoExif test: EXIF whose DateTimeOriginal is
0000:00:00 00:00:00, as a camera with an unset clock writes it, gives no
dateTimeOriginal while its other fields are still read. Remove the README
sentence describing the backup's exif field in dumps from an earlier
version.

Model: opus-5-5
2026-10-01 19:14:59 +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