Skip to content

Dev/read 16bit ir#1690

Draft
romleiaj wants to merge 11 commits into
mainfrom
dev/read-16bit-ir
Draft

Dev/read 16bit ir#1690
romleiaj wants to merge 11 commits into
mainfrom
dev/read-16bit-ir

Conversation

@romleiaj

@romleiaj romleiaj commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Goal is to read and display 16-bit IR thermal imagery with the option for a linear stretch - squashing naively results in a gray image.

#1590

romleiaj added 11 commits June 3, 2026 18:17
  Each camera now maintains independent enhancement values. Viewer.vue
  loads enhancements from each camera's sub-meta instead of root meta,
  saves to the correct camera-scoped path via a per-camera debounce map,
  and flushes pending saves before switching cameras.
Float32/Float64 TIFFs now use sort-based percentile instead of the
integer histogram, which collapsed sub-integer values to a single bin
and produced solid-color output silently. Uint8/Uint16 bin counts are
now type-matched (256 vs 65536).

Zero-range frames (flat field, dead sensor) now render as mid-gray;
the previous check tested only raw[0] against min, so every uniform
frame filled with black.

Cache keys now include mtimeMs so entries are invalidated when a source
file is replaced at the same path, matching the tile cache pattern.

fs.statSync replaced with await fs.stat to avoid blocking the event
loop on a per-frame hot path. The two try-catch blocks collapsed into
one with ENOENT distinguished for a 404.

Array.isArray guards added for low and high query params; duplicate
params previously passed validation and silently discarded extra values.
A low >= high check catches inverted percentile inputs at the boundary.

encodePngRgba deduplicated — exported from displayProcessing.ts and
imported by geotiffTiles.ts, removing the unused pngjs import.
…bounce, stale isDefaultImage, TIFF lazy load, and in-flight decode dedup
@romleiaj romleiaj requested a review from BryonLewis June 9, 2026 18:13
@romleiaj romleiaj self-assigned this Jun 9, 2026
@romleiaj romleiaj marked this pull request as draft June 9, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant