ThumbnailPack appends self-describing CRC-checked JPEG entries (320 px,
q80) and index records; a two-slot header flips to each new index, so
crashes and truncation lose only the damaged tail, and compaction
rewrites live entries through AtomicFile. Reads are positional and run
concurrently with the writer. ThumbnailCache is a byte-budget LRU that
coalesces concurrent loads. ProxyBuilder decodes at the policy long
edge with orientation applied and writes JPEG q92 with the source Exif
(capture time kept, orientation reset).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
ManagedDecoderProvider decodes JPEG/PNG/TIFF natively, DNG and the
supported RAWs through RawDecoder, and falls back to the largest
suitable embedded JPEG (oriented like the main image) for other RAWs,
CR3, HEIF and unsupported bodies. Requests use JPEG DCT scaling, CFA
binning when MaxLongEdge allows, bilinear demosaic for thumbnails and
analysis, and ForcePreview. DecoderFactory builds the client (WIC then
managed) and server chains and the per-format tier table; Probe gives
the per-file tier without decoding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Each container reader builds a RawFrame for the shared pipeline: CR2
sliced lossless JPEG with SensorInfo crop, masked-column black and
ColorData WB; NEF uncompressed and Nikon Huffman (lossy type 1,
lossless, lossy type 2 incl. split); ARW uncompressed and ARW2 cRAW
with tone curve; PEF uncompressed and Pentax Huffman; RAF uncompressed
Bayer and X-Trans with FujiIFD. Colour comes from a dcraw adobe_coeff
matrix table; bodies without an entry are reported unsupported so the
caller uses the embedded preview. Native RAWs detect the sensor's
saturation level for clipping only, never rescaling per frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Reads CFA and LinearRaw DNGs (compression 1/7/8/34892), linearises with
LinearizationTable, BlackLevel (repeat + deltas) and WhiteLevel over the
ActiveArea, applies OpcodeList1-3 (GainMap, WarpRectilinear,
FixVignetteRadial, FixBadPixels*, TrimBounds, MapTable/MapPolynomial,
Delta/ScalePer*), solves white balance per DNG 1.6 chapter 6 (CCT
interpolation, ForwardMatrix, Bradford to D65), demosaics with AHD
(Hirakawa & Parks 2005), bilinear, a neighbourhood interpolation for
non-Bayer CFAs or binning, and reconstructs clipped highlights.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
EncodeRow8/16 reuse one pooled scratch row for RGB-to-gray output
instead of allocating per row; drop unused JPEG marker constants; the
24 MP timing test skips itself when the JIT optimiser is disabled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Single-strip uncompressed files (Photoshop's default) exceed
TiffReader's bounded read; such strips are now read in pieces, the
uncompressed path skips a copy, and hostile strip/tile counts are
rejected up front.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Two-pass Lanczos3 (downscale, support stretched by the reduction) and
Catmull-Rom (upscale) with normalised, edge-folded weights; exact
area-average box path for thumbnails; pass order chosen by cost,
Vector<float> inner loops, parallel rows. Tests cover constant images,
energy preservation, step ringing against the kernel's exact discrete
bound, Exif orientations and dithering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
16-bit LinearRaw DNG 1.4 with tiles (lossless JPEG or uncompressed),
ColorMatrix1 = XYZ(D65) to linear sRGB, ForwardMatrix1 to XYZ(D50),
D65 illuminant, neutral AsShotNeutral, WhiteLevel 65535 and optional
Exif. LibRaw renders test patches back to the exact source values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
TiffImageReader decodes strips and tiles (chunky or planar) with none,
LZW (old-style bit order tolerated), Deflate, PackBits and JPEG
compression (JPEGTables, YCbCr or RGB, lossless SOF3 tiles reshaped as
DNG writes them), predictors 2/3 and the DNG x2/x4 variants, 1-16 bit
integer and 16/32-bit float samples; tiles decode in parallel. Output
is a raw TiffRaster or a linear ImageBuffer. JPEG strips match libtiff
bit for bit.
TiffWriter writes 8/16-bit gray/RGB/RGBA, uncompressed or Deflate with
horizontal predictor, and embeds capture metadata from an Exif block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
BuildTiff writes a little-endian TIFF with IFD0 (camera, orientation,
software, date, authorship, resolution), the Exif IFD (capture time
with sub-seconds and offset, exposure, ISO with RecommendedExposureIndex
above 65535, focal lengths, bias, body serial, lens) and a GPS IFD when
known. BuildJpegApp1 wraps it in a complete APP1 segment; strings are
capped at 2000 UTF-8 bytes on character boundaries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
ImageSignature.Detect identifies every BRIEF 8.1 format by magic bytes,
refining TIFF-based RAWs by the CR2 marker, DNGVersion and Make, and
ISO-BMFF files by ftyp brands; the extension only breaks ties.
MetadataReader.Read (path or seekable stream) dispatches to the
container parsers, opens files shared for read/write/delete with a
small buffer, honours cancellation and turns any parser defect into a
warning so malformed input never throws.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
RAF: embedded JPEG Exif and preview, size from the RAF directory
(0x0111 cropped, else 0x0100), bit depth from the FujiIFD. PNG: IHDR,
eXIf and iTXt/tEXt XMP (zlib supported), seeking over image data.
WebP: VP8X canvas or VP8/VP8L headers, EXIF and XMP chunks. GIF and
BMP sizes, the JPEG XR IFD and the JPEG XL size header plus container
Exif/XML boxes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
BmffReader reads box headers only (32/64-bit and to-end sizes, uuid
user types, per-container count and path depth caps). HeifParser
handles hdlr/pitm/iinf (infe v2/v3)/iloc (v0-v2, multi-extent, idat)/
iprp: size from the primary item's ispe, bit depth from pixi, Exif and
XMP items; irot/imir define the orientation and override Exif because
HEIF decoders apply them. Cr3Parser reads CMT1-4 and THMB from the
Canon uuid box, PRVW, the XMP uuid, track 1's full-size JPEG through
the sample tables and the raw size from the CRAW/CMP1 header.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
ExifParser walks IFD0, Exif, GPS and SubIFDs, selects the main raster
(largest full-resolution IFD), and enumerates embedded JPEG previews
(JPEGInterchangeFormat, single-strip/tile Compression 6/7, lossless
raw strips excluded). JpegParser scans APP1 Exif/XMP/extended XMP,
APP2 MPF large thumbnails and SOFn up to SOS, tolerating fill bytes
and garbage. Vendor MakerNotes (Canon, Nikon, Sony, Fujifilm,
Olympus/OM, Panasonic) fill serial, lens, shutter count, stabiliser,
ISO and colour temperature only when standard tags did not.
TiffTags gains GPSVersionID, GPSStatus, YCbCrPositioning,
StandardOutputSensitivity and ISOSpeed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Bounds-checked positional stream reads, an in-memory span reader,
Exif/XMP date parsing, and the MetadataBuilder accumulator that applies
every fallback chain (timestamps, ISO, serial/lens, orientation,
preview kinds) in one place. XMP is read with XmlReader (no DTDs, no
resolver, 4 MB cap) in both attribute and element forms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
The flow median filter runs the odd-even transposition network on
Vector<float> blocks in the interior (shared with the temporal median),
which removes the dominant cost of Best-quality flow. The stabiliser
analyses its nine patches in parallel with one correlator each and
gathers results in patch order, so output stays deterministic. Adds
brute-force reference tests for the median, box and binomial kernels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Metadata steps are verified against the detrended measured jump; only
received steps are removed, the step-free series deflickered and the
steps restored as smoothstep transitions that lengthen until no frame
step exceeds 0.3 EV.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Horizon from the strongest column-averaged row step (median over
frames), refined per column by a dynamic-programming path and feathered;
Otsu luminance fallback with morphology; confidences for both. Region
deflicker fits sky and land separately and blends through the mask.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Robust LOWESS target curve with intentional exposure offsets removed,
blended by Tukey weight and surviving-window fraction; flicker spectrum
from the autocorrelation of detrended luminance recommends a window of
four periods.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Known-answer fixtures: brightness ramp, seeded global/sky/land flicker,
metadata and pixel exposure steps, horizon split, colour temperature
drift and white-balance jitter, star field, black/white/duplicate
frames, gaps and clock shifts. Covers frame statistics (CCT against
exact blackbody chromaticities) and the light analyzer with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Cadence, jitter, gaps and sessions (small sessions merge), timestamp
sanity (duplicates, out-of-order frames, clock jumps incl. DST), EV
series and exposure steps, camera/lens identity, resolution and
orientation consistency, and NOAA day phases from GPS. Findings carry
stable resource keys plus positional arguments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Every colour type and bit depth (1/2/4/8/16), PLTE + tRNS (palette alpha
and colour keys), Adam7, all five filters, zlib via ZLibStream; CRC
mismatches and truncated data are tolerated with warnings. PngEncoder
gains an additive ImageBuffer overload (8/16-bit sRGB with sRGB chunk)
and the Palette colour type for decoding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
SleepBlocker requests ES_CONTINUOUS | ES_SYSTEM_REQUIRED (optionally the
display) from a dedicated thread, because the execution state belongs to the
calling thread; disposing from any thread clears it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
DwmWindow sets dark mode (attribute 20, 19 on older Windows 10), Mica/none
backdrop, corner preference and caption/border colours, returning false for
null or stale windows and unsupported builds. SystemTheme reads
AppsUseLightTheme and the accent colour (DWM AccentColor, else
DwmGetColorizationColor); SystemThemeWatcher raises Changed from a
RegNotifyChangeKeyValue thread when either value actually changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Dpapi.Protect/Unprotect wrap CryptProtectData/CryptUnprotectData in the
current-user scope with optional entropy and no UI; decrypted native buffers
are zeroed before LocalFree. String helpers return Base64 for JSON settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
VolumeInfo reads label, file system, serial, capacity, drive type and DCIM
presence (no "insert disk" prompts) and exposes the card identity
{serial:X8}-{label}-{capacity}. RemovableVolumeWatcher runs a hidden
top-level window on its own message loop for WM_DEVICECHANGE volume unit
masks (message-only windows receive no broadcasts) plus a 3 s DriveInfo poll,
diffing snapshots so each change is raised once. VolumeEjector locks
(with retries), dismounts, allows removal and ejects; FormatDialog shows
SHFormatDrive with quick format preselected and refuses the system drive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
WicDecoderProvider decodes through a pull chain (decoder, Fant scaler to
MaxLongEdge, format converter) read in bounded row bands. Integer sources are
requested as 64bppRGBA and linearised with the exact sRGB EOTF (Linear16);
float/fixed sources as 128bppRGBAFloat (scRGB, already linear). The Exif
orientation (photo policy, then raw IFD queries) is applied while
de-interleaving instead of through IWICBitmapFlipRotator, which Microsoft
documents as quadratic over scanline decoders.
CodecInventory enumerates installed decoders (CreateComponentEnumerator),
probes HEVC/AV1 decoders with MFTEnumEx and identifies the Raw Image
Extension by package family, since it shares the in-box RAW codec's CLSID.
It maps every ImageFileFormat to its decoder, native flag and the Store
extensions (product ids, ms-windows-store links) that would unlock it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
ShellLauncher opens only http(s) and ms-windows-store URLs and reveals files
(SHOpenFolderAndSelectItems) or folders ("explore") on an STA. TaskbarProgress
wraps ITaskbarList3 and returns false for null or stale windows. KnownFolders
reads LocalAppData/Pictures via SHGetKnownFolderPath. AppPaths resolves the
data root (%LOCALAPPDATA%\Titano or .\data in portable mode) and refuses to
create it inside a OneDrive sync root (environment variables and
HKCU\Software\Microsoft\OneDrive\Accounts\*\UserFolder).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Win32Com joins threads to the MTA on demand, creates in-process COM objects
and releases wrappers deterministically; PropVariant (x64 layout) with
PropVariantClear; Win32Window validates HWNDs; ShellStream opens files through
SHCreateStreamOnFileEx with STGM_SHARE_DENY_NONE so readers never block writers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Port libjpeg's resync_to_restart decision rules (skip bogus markers and
stale RSTs, account for lost intervals), reject oversubscribed Huffman
tables before filling the lookahead table (found by fuzzing), and keep
triangle chroma upsampling at 1/8 scale for better thumbnails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
TemporalStacker keeps a sliding window of pooled frame copies and renders
an exact per-pixel median (vectorised odd-even transposition network up
to 32 frames, Hoare selection beyond) or mean. StarTrailStacker keeps a
progressive maximum with exponential decay; trail length in frames maps
to the decay that fades a trail to 1 %.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC