style: whitespace formatting after metadata merge; record metadata decisions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 10:06:13 +00:00
1 parent ec71b2fc91
commit c6857983d9
2 files changed
+29 -24

No files matched your search

+5
View File
@@ -45,3 +45,8 @@ One line per decision: date · decision · alternative · reason.
| 2026-10-02 | Virtual-camera zoom is interpolated geometrically; trail length L ↦ decay 0.01^(1/L). | Linear zoom / half-life | Even perceived speed; the trail is gone at its stated length. |
| 2026-10-02 | Motion estimation, sharpness and noise use sRGB-encoded luminance. | Linear light | Shadows keep texture weight; less exposure dependence. |
| 2026-10-02 | Archive presets use 0.30 bpp (≈60 Mb/s at 4K24 HEVC 10-bit); share presets use the brief's per-codec defaults (0.10/0.07/0.05). | 0.07 bpp everywhere | An archive must survive later re-encoding; star fields are the hardest content. |
| 2026-10-02 | All metadata fallback chains (time, ISO, serial, lens, rating, size) live in `MetadataBuilder.Build`; parsers only collect candidates. | Fallbacks inside each parser | One place for priority rules; parsers are order-independent. |
| 2026-10-02 | `MetadataReader.Read(path)` throws when the file cannot be opened; malformed content becomes warnings (with a parser-fault safety net the fuzz tests require to stay unused). | Swallow everything | An unopenable file is not malformed input. |
| 2026-10-02 | HEIF `irot`/`imir` override Exif orientation (imir axis 0 = top↔bottom). | Exif first | HEIF decoders apply the transforms themselves; both would rotate twice. |
| 2026-10-02 | Main image size comes from the container's own size field (SOF, IHDR, ispe, VP8X, RAF crop record, RW2 borders, CR3 CMP1) before raster IFDs. | Always the largest raster IFD | That is what each container defines and what decoders output. |
| 2026-10-02 | Only MPF large-thumbnail entries count as previews; XMP date-only values are never used as capture times. | Every secondary image / midnight | Gain maps are not previews; midnight would be invented. |
@@ -225,37 +225,37 @@ internal static class TiffFile
case byte[] raw:
return (raw, (uint)raw.Length);
case ushort[] shorts:
{
var b = new byte[2 * shorts.Length];
for (var i = 0; i < shorts.Length; i++) Write16(b.AsSpan(2 * i), shorts[i]);
return (b, (uint)shorts.Length);
}
{
var b = new byte[2 * shorts.Length];
for (var i = 0; i < shorts.Length; i++) Write16(b.AsSpan(2 * i), shorts[i]);
return (b, (uint)shorts.Length);
}
case uint[] longs:
{
var b = new byte[4 * longs.Length];
for (var i = 0; i < longs.Length; i++) Write32(b.AsSpan(4 * i), longs[i]);
return (b, (uint)longs.Length);
}
{
var b = new byte[4 * longs.Length];
for (var i = 0; i < longs.Length; i++) Write32(b.AsSpan(4 * i), longs[i]);
return (b, (uint)longs.Length);
}
case (uint, uint)[] rationals:
{
var b = new byte[8 * rationals.Length];
for (var i = 0; i < rationals.Length; i++)
{
Write32(b.AsSpan(8 * i), rationals[i].Item1);
Write32(b.AsSpan(8 * i + 4), rationals[i].Item2);
var b = new byte[8 * rationals.Length];
for (var i = 0; i < rationals.Length; i++)
{
Write32(b.AsSpan(8 * i), rationals[i].Item1);
Write32(b.AsSpan(8 * i + 4), rationals[i].Item2);
}
return (b, (uint)rationals.Length);
}
return (b, (uint)rationals.Length);
}
case (int, int)[] signed:
{
var b = new byte[8 * signed.Length];
for (var i = 0; i < signed.Length; i++)
{
Write32(b.AsSpan(8 * i), (uint)signed[i].Item1);
Write32(b.AsSpan(8 * i + 4), (uint)signed[i].Item2);
var b = new byte[8 * signed.Length];
for (var i = 0; i < signed.Length; i++)
{
Write32(b.AsSpan(8 * i), (uint)signed[i].Item1);
Write32(b.AsSpan(8 * i + 4), (uint)signed[i].Item2);
}
return (b, (uint)signed.Length);
}
return (b, (uint)signed.Length);
}
default:
throw new InvalidOperationException("Unsupported test value " + v.Data.GetType());
}